Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Functional tests - basic tests for single metric viewer and anomaly explorer #54699

Merged
merged 9 commits into from Jan 14, 2020

Conversation

@pheyos
Copy link
Contributor

pheyos commented Jan 14, 2020

Summary

This PR adds basic functional UI tests for the single metric viewer and the anomaly explorer.

High level test steps / validations

Single metric viewer:

  • loads from job list row link
  • pre-fills the job selection
  • pre-fills the detector input
  • displays the chart
  • displays the anomalies table
  • anomalies table is not empty

Anomaly explorer:

  • loads from job list row link
  • pre-fills the job selection'
  • displays the influencers list
  • displays the swim lanes
  • displays the anomalies table
  • anomalies table is not empty
pheyos added 7 commits Dec 20, 2019
@pheyos pheyos requested review from walterra and peteharverson Jan 14, 2020
@pheyos pheyos requested a review from elastic/ml-ui as a code owner Jan 14, 2020
@pheyos pheyos self-assigned this Jan 14, 2020
@elasticmachine

This comment has been minimized.

Copy link
Contributor

elasticmachine commented Jan 14, 2020

Pinging @elastic/ml-ui (:ml)

@pheyos

This comment has been minimized.

Copy link
Contributor Author

pheyos commented Jan 14, 2020

Checking stability of new tests in https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/131/ ...

Passed 30x

Copy link
Contributor

peteharverson left a comment

Great job adding in the first set of tests for the results views!

Overall LGTM, just a few minor questions.

const jobId = jobConfig.job_id;
log.debug(`Creating anomaly detection job with id '${jobId}'...`);
await esSupertest
.put(`/_ml/anomaly_detectors/${jobId}`)

This comment has been minimized.

Copy link
@peteharverson

peteharverson Jan 14, 2020

Contributor

Should we be using the Kibana versions of these endpoints? e.g. /api/ml/anomaly_detectors/{jobId} ?

This comment has been minimized.

Copy link
@pheyos

pheyos Jan 14, 2020

Author Contributor

As discussed on slack, we will stay with the ES API for now.

Copy link
Contributor

peteharverson left a comment

Latest edits LGTM


import { FtrProviderContext } from '../../../ftr_provider_context';

const JOB_CONFIG = {

This comment has been minimized.

Copy link
@jgowdyelastic

jgowdyelastic Jan 14, 2020

Member

nit, it might be with explicitly supplying the type to the job and datafeed configs.

import {
  Job,
  Datafeed,
} from '../../../../../legacy/plugins/ml/public/application/jobs/new_job/common/job_creator/configs';

const JOB_CONFIG: Job = {
...

This comment has been minimized.

Copy link
@pheyos

pheyos Jan 14, 2020

Author Contributor

Good idea, done in 2322004

Copy link
Member

jgowdyelastic left a comment

LGTM
Added a nit pick about adding the Job and Datafeed types to the job and datafeed

@kibanamachine

This comment has been minimized.

Copy link

kibanamachine commented Jan 14, 2020

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pheyos pheyos merged commit 6a45241 into elastic:master Jan 14, 2020
55 checks passed
55 checks passed
API integration tests node scripts/functional_tests --config test/api_integration/config.js --bail --debug
Details
Browser tests yarn run grunt test:browser-ci
Details
Build kbn_tp_sample_panel_action yarn build
Details
CLA All commits in pull request signed
Details
Check core API changes node scripts/check_core_api_changes
Details
Check file casing node scripts/check_file_casing --quiet
Details
Check licenses node scripts/check_licenses --dev
Details
Example functional tests node scripts/functional_tests --config test/examples/config.js --bail --debug
Details
Firefox smoke test node scripts/functional_tests --bail --debug --kibana-install-dir /dev/shm/workspace/kibana/build/oss/kibana-8.0.0-SNAPSHOT-linux-x86_64 --include-tag smoke --config test/functional/config.firefox.js
Details
Functional tests / Group 1 yarn run grunt run:functionalTests_ciGroup1
Details
Functional tests / Group 10 yarn run grunt run:functionalTests_ciGroup10
Details
Functional tests / Group 11 yarn run grunt run:functionalTests_ciGroup11
Details
Functional tests / Group 12 yarn run grunt run:functionalTests_ciGroup12
Details
Functional tests / Group 2 yarn run grunt run:functionalTests_ciGroup2
Details
Functional tests / Group 3 yarn run grunt run:functionalTests_ciGroup3
Details
Functional tests / Group 4 yarn run grunt run:functionalTests_ciGroup4
Details
Functional tests / Group 5 yarn run grunt run:functionalTests_ciGroup5
Details
Functional tests / Group 6 yarn run grunt run:functionalTests_ciGroup6
Details
Functional tests / Group 7 yarn run grunt run:functionalTests_ciGroup7
Details
Functional tests / Group 8 yarn run grunt run:functionalTests_ciGroup8
Details
Functional tests / Group 9 yarn run grunt run:functionalTests_ciGroup9
Details
Internationalization check node scripts/i18n_check --ignore-missing
Details
Interpreter functional tests node scripts/functional_tests --config test/interpreter_functional/config.ts --bail --debug --kibana-install-dir /dev/shm/workspace/kibana/build/oss/kibana-8.0.0-SNAPSHOT-linux-x86_64-2
Details
Jest integration tests yarn run grunt test:jest_integration
Details
Jest tests yarn run grunt test:jest
Details
Kibana accessibility tests node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/kibana/build/oss/kibana-8.0.0-SNAPSHOT-linux-x86_64 --config test/accessibility/config.ts
Details
Mocha tests node scripts/mocha
Details
Plugin functional tests node scripts/functional_tests --config test/plugin_functional/config.js --bail --debug
Details
Project tests yarn run grunt test:projects
Details
Type check node scripts/type_check
Details
TypeScript - all files belong to a TypeScript project node scripts/check_ts_projects
Details
Verify NOTICE.txt node scripts/notice --validate
Details
Verify dependency versions yarn run grunt verifyDependencyVersions
Details
X-Pack Chrome Functional tests / Group 1 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-2 --include-tag ciGroup1
Details
X-Pack Chrome Functional tests / Group 10 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-11 --include-tag ciGroup10
Details
X-Pack Chrome Functional tests / Group 2 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-3 --include-tag ciGroup2
Details
X-Pack Chrome Functional tests / Group 3 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-4 --include-tag ciGroup3
Details
X-Pack Chrome Functional tests / Group 4 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-5 --include-tag ciGroup4
Details
X-Pack Chrome Functional tests / Group 5 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-6 --include-tag ciGroup5
Details
X-Pack Chrome Functional tests / Group 6 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-7 --include-tag ciGroup6
Details
X-Pack Chrome Functional tests / Group 7 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-8 --include-tag ciGroup7
Details
X-Pack Chrome Functional tests / Group 8 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-9 --include-tag ciGroup8
Details
X-Pack Chrome Functional tests / Group 9 node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-10 --include-tag ciGroup9
Details
X-Pack Jest node scripts/jest --ci --verbose
Details
X-Pack Karma Tests yarn test:browser
Details
X-Pack SIEM cyclic dependency test node legacy/plugins/siem/scripts/check_circular_deps
Details
X-Pack accessibility tests node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana --config test/accessibility/config.ts
Details
X-Pack firefox smoke test node scripts/functional_tests --debug --bail --kibana-install-dir /dev/shm/workspace/install/kibana-1 --include-tag smoke --config test/functional/config.firefox.js
Details
elasticsearch-ci/docs Build finished.
Details
eslint node scripts/eslint --no-cache
Details
kibana-ci Build finished.
Details
prbot:outdated
prbot:release note labels
prbot:release version labels
sasslint node scripts/sasslint
Details
@pheyos pheyos deleted the pheyos:result_views branch Jan 14, 2020
pheyos added a commit to pheyos/kibana that referenced this pull request Jan 14, 2020
…aly explorer (elastic#54699)

This PR adds basic functional UI tests for the single metric viewer and the anomaly explorer.
pheyos added a commit that referenced this pull request Jan 14, 2020
…aly explorer (#54699) (#54746)

This PR adds basic functional UI tests for the single metric viewer and the anomaly explorer.
jkelastic added a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
…aly explorer (elastic#54699)

This PR adds basic functional UI tests for the single metric viewer and the anomaly explorer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.