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

Using @elastic/synthetics to run uptime e2e tests #90673

Closed
wants to merge 61 commits into from

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Feb 8, 2021

Summary

Using https://github.com/elastic/synthetics to run uptime kibana functional tests

This contains a simple journey which runs against live heartbeat data using docker

To Start test server:

This is using standard kibana ftr server, in exception that it doesn't start esCluster and instead uses docker to start heartbeat and elasticsearch. Since it would be a hassle communicating from heartbeat docker to outside escluster.

in uptime dir

do

node scripts/start_e2e_server.js

This will start kibana

to run a test once server is up

node scripts/start_e2e_runner.js

runner will run test and output results:

image

@shahzad31 shahzad31 added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Feb 8, 2021
@vigneshshanmugam
Copy link
Member

vigneshshanmugam commented Feb 8, 2021

Nice work.

Should we use synthetics docker image or use npm packages like in this example

I would stay with just using the library from the NPM instead of going through heartbeat as we want it to behave a test runner rather than for monitoring purposes (Uptime UI on top of the existing CLI).

Which version of synthetics to use? Clone synthetics repo to always use latest master?

Use the latest published one from NPM, using master from synthetics would be a wrong choice as we might break at some point and that means the PR's in kibana would be blocked. Also it aligns more with how our users would be using the tool instead of staying latest on master.

Hope this helps.

@shahzad31 shahzad31 changed the title [Uptime POC] Using @elastic/synthetics to run kibana FTR Using @elastic/synthetics to run kibana FTR Mar 1, 2021
@shahzad31 shahzad31 changed the title Using @elastic/synthetics to run kibana FTR Using @elastic/synthetics to run uptime e2e tests Mar 1, 2021
@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

Comment on lines 112 to 118
stage('UPTIME-UI') {
agent { label 'linux && immutable' }
options { skipDefaultCheckout() }
when { expression { return env.RUN_UPTIME_E2E != "false" } }
steps {
echo 'TBC'
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new section after restructuring the CI pipeline to support two parallel stages, one for the existing e2e for the APM-UI and a new stage (this one) for the Uptime e2e.

@v1v
Copy link
Member

v1v commented Mar 1, 2021

There is now a new check for the e2e for uptime-ui:

image

The CI changes are half implemented now, I'll work then in the implementation details regarding running the uptime e2e in the CI.

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@shahzad31
Copy link
Contributor Author

@v1v looking awesome

@shahzad31 shahzad31 marked this pull request as ready for review March 2, 2021 11:16
@spalger spalger added v7.14.0 and removed v7.13.0 labels Apr 21, 2021
always {
dir("${UPTIME_E2E_DIR}"){
sh 'docker-compose logs > uptime-e2e-docker.log || true'
archiveArtifacts(allowEmptyArchive: true, artifacts: 'uptime-e2e-docker.log')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once L159 produces the junit files, then you can add something like

Suggested change
archiveArtifacts(allowEmptyArchive: true, artifacts: 'uptime-e2e-docker.log')
archiveArtifacts(allowEmptyArchive: true, artifacts: 'uptime-e2e-docker.log')
junit(allowEmptyResults: true, testResults: '<RELATIVE_PATH_FROM_UPTIME_E2E_DIR>/<FILE_NAME>.xml')

But please replace '<RELATIVE_PATH_FROM_UPTIME_E2E_DIR>/<FILE_NAME>.xml'

@spalger spalger added v7.15.0 and removed v7.14.0 labels Jun 30, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Jul 7, 2021

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: metrics for 92f3b41 were not reported

History

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

cc @shahzad31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants