Skip to content

feat: add support for screenshot toggle#311

Merged
vigneshshanmugam merged 4 commits intoelastic:masterfrom
vigneshshanmugam:screenshot-toggle
Jun 21, 2021
Merged

feat: add support for screenshot toggle#311
vigneshshanmugam merged 4 commits intoelastic:masterfrom
vigneshshanmugam:screenshot-toggle

Conversation

@vigneshshanmugam
Copy link
Copy Markdown
Member

@vigneshshanmugam vigneshshanmugam commented Jun 17, 2021

  • part of #308
  • Extends the previous --screenshot option with on|off|only-on-failure and defaulting to on.
on - capture screenshots for all step in a journey
off - do not capture any screenshots
only-on-failure - capture screenshots for all steps when anyone of the journey fails (any step in a journey fails). 
  • This is a non-breaking change and backwards compatible with previous boolean flag.

@ghost
Copy link
Copy Markdown

ghost commented Jun 17, 2021

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: Pull request #311 updated

  • Start Time: 2021-06-21T22:00:24.292+0000

  • Duration: 27 min 45 sec

  • Commit: 47f131d

Test stats 🧪

Test Results
Failed 0
Passed 109
Skipped 0
Total 109

Trends 🧪

Image of Build Times

Image of Tests

Log output

Expand to view the last 100 lines of log output

[2021-06-21T22:09:18.763Z]  > git merge a53a29dd2bbc49d7f490e207e4ff39c1d695747d # timeout=10
[2021-06-21T22:09:18.796Z]  > git rev-parse HEAD^{commit} # timeout=10
[2021-06-21T22:09:18.805Z]  > git config core.sparsecheckout # timeout=10
[2021-06-21T22:09:18.808Z]  > git checkout -f 848db0095164dde41420f9e731729813de4a2f89 # timeout=15
[2021-06-21T22:09:22.328Z] Commit message: "Merge commit 'a53a29dd2bbc49d7f490e207e4ff39c1d695747d' into HEAD"
[2021-06-21T22:09:22.331Z]  > git rev-list --no-walk a50fe3f657834d12383874bd2a0e2456343f2644 # timeout=10
[2021-06-21T22:09:22.356Z] Cleaning workspace
[2021-06-21T22:09:22.359Z]  > git rev-parse --verify HEAD # timeout=10
[2021-06-21T22:09:22.363Z] Resetting working tree
[2021-06-21T22:09:22.363Z]  > git reset --hard # timeout=10
[2021-06-21T22:09:22.377Z]  > git clean -fdx # timeout=10
[2021-06-21T22:09:23.917Z] Running in /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/src/github.com/elastic/synthetics
[2021-06-21T22:09:38.204Z] + set +x
[2021-06-21T22:09:38.204Z] => Downloading nvm from git to '/var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/.nvm'
[2021-06-21T22:09:38.204Z] 
=> Initialized empty Git repository in /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/.nvm/.git/
[2021-06-21T22:09:38.775Z] From https://github.com/nvm-sh/nvm
[2021-06-21T22:09:38.775Z]  * [new tag]         v0.37.1    -> v0.37.1
[2021-06-21T22:09:38.775Z] => Compressing and cleaning up git repository
[2021-06-21T22:09:38.775Z] 
[2021-06-21T22:09:38.775Z] => Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
[2021-06-21T22:09:38.775Z] => Create one of them and run this script again
[2021-06-21T22:09:38.775Z]    OR
[2021-06-21T22:09:38.775Z] => Append the following lines to the correct file yourself:
[2021-06-21T22:09:38.775Z] 
[2021-06-21T22:09:38.775Z] export NVM_DIR="$HOME/.nvm"
[2021-06-21T22:09:38.775Z] [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[2021-06-21T22:09:38.775Z] 
[2021-06-21T22:09:40.687Z] => Close and reopen your terminal to start using nvm or run the following to use it now:
[2021-06-21T22:09:40.687Z] 
[2021-06-21T22:09:40.687Z] export NVM_DIR="$HOME/.nvm"
[2021-06-21T22:09:40.687Z] [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[2021-06-21T22:09:40.687Z] Installing latest LTS version.
[2021-06-21T22:09:40.687Z] v14.17.1 is already installed.
[2021-06-21T22:09:40.947Z] Now using node v14.17.1 (npm v6.14.13)
[2021-06-21T22:09:41.010Z] Running in /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/src/github.com/elastic/synthetics
[2021-06-21T22:09:41.301Z] + chmod -R ugo+rw examples
[2021-06-21T22:09:41.317Z] Running in /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/src/github.com/elastic/synthetics/__tests__/e2e
[2021-06-21T22:09:41.619Z] + npm run test
[2021-06-21T22:09:41.619Z] 
[2021-06-21T22:09:41.619Z] > e2e-synthetics@ test /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/src/github.com/elastic/synthetics/__tests__/e2e
[2021-06-21T22:09:41.619Z] > npm i && npm run setup &&  bash scripts/test.sh
[2021-06-21T22:09:41.619Z] 
[2021-06-21T22:09:44.918Z] added 3 packages from 4 contributors and audited 178 packages in 2.515s
[2021-06-21T22:09:46.827Z] 
[2021-06-21T22:09:46.827Z] 66 packages are looking for funding
[2021-06-21T22:09:46.827Z]   run `npm fund` for details
[2021-06-21T22:09:46.827Z] 
[2021-06-21T22:09:46.827Z] found 1 moderate severity vulnerability
[2021-06-21T22:09:46.827Z]   run `npm audit fix` to fix them, or `npm audit` for details
[2021-06-21T22:09:47.089Z] 
[2021-06-21T22:09:47.089Z] > e2e-synthetics@ setup /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/src/github.com/elastic/synthetics/__tests__/e2e
[2021-06-21T22:09:47.089Z] > bash scripts/setup.sh
[2021-06-21T22:09:47.089Z] 
[2021-06-21T22:09:47.349Z] 
[2021-06-21T22:09:47.349Z] Temporary folder
[2021-06-21T22:09:47.349Z] Temporary files will be stored in: ./tmp
[2021-06-21T22:09:47.349Z] 
[2021-06-21T22:09:47.349Z] Starting elasticsearch , kibana and synthetics docker
[2021-06-21T22:09:47.350Z] 
[2021-06-21T22:09:47.350Z] 
[2021-06-21T22:09:47.350Z] Waiting for synthetics docker to start...
[2021-06-21T22:09:47.350Z] Error: No such object: synthetics
[2021-06-21T22:09:57.344Z] Error: No such object: synthetics
[2021-06-21T22:10:07.343Z] Error: No such object: synthetics
[2021-06-21T22:10:19.574Z] Error: No such object: synthetics
[2021-06-21T22:10:27.714Z] Error: No such object: synthetics
[2021-06-21T22:10:37.710Z] Error: No such object: synthetics
[2021-06-21T22:10:47.720Z] Error: No such object: synthetics
[2021-06-21T22:10:59.968Z] ✅ Setup completed successfully. Running e2e tests...
[2021-06-21T22:10:59.968Z] Waiting for Elastic Search  to start
[2021-06-21T22:11:38.904Z] Waiting for Synthetics to send data to ES for test monitor
[2021-06-21T22:26:59.166Z] Cancelling nested steps due to timeout
[2021-06-21T22:26:59.172Z] Sending interrupt signal to process
[2021-06-21T22:27:01.297Z] scripts/test.sh: line 26:  5067 Terminated              SYNTHETICS_JUNIT_FILE='junit.xml' npx @elastic/synthetics uptime.journey.ts --reporter junit
[2021-06-21T22:27:01.297Z] npm ERR! code ELIFECYCLE
[2021-06-21T22:27:01.297Z] npm ERR! errno 143
[2021-06-21T22:27:01.297Z] npm ERR! e2e-synthetics@ test: `npm i && npm run setup &&  bash scripts/test.sh`
[2021-06-21T22:27:01.297Z] npm ERR! Exit status 143
[2021-06-21T22:27:01.297Z] npm ERR! 
[2021-06-21T22:27:01.297Z] npm ERR! Failed at the e2e-synthetics@ test script.
[2021-06-21T22:27:01.297Z] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[2021-06-21T22:27:01.297Z] 
[2021-06-21T22:27:01.297Z] npm ERR! A complete log of this run can be found in:
[2021-06-21T22:27:01.297Z] npm ERR!     /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311/.npm/_logs/2021-06-21T22_26_59_386Z-debug.log
[2021-06-21T22:27:01.303Z] script returned exit code 143
[2021-06-21T22:27:07.927Z] Post stage
[2021-06-21T22:27:07.951Z] Archiving artifacts
[2021-06-21T22:27:08.100Z] Recording test results
[2021-06-21T22:27:08.222Z] None of the test reports contained any result
[2021-06-21T22:27:08.227Z] [Checks API] No suitable checks publisher found.
[2021-06-21T22:27:08.309Z] Stage "Release" skipped due to earlier failure(s)
[2021-06-21T22:27:08.321Z] Stage "Release" skipped due to earlier failure(s)
[2021-06-21T22:27:08.346Z] Stage "Release" skipped due to earlier failure(s)
[2021-06-21T22:27:08.785Z] Running on Jenkins in /var/lib/jenkins/workspace/nt-rum_elastic-synthetics_PR-311
[2021-06-21T22:27:08.820Z] [INFO] getVaultSecret: Getting secrets
[2021-06-21T22:27:08.855Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-06-21T22:27:09.484Z] + chmod 755 generate-build-data.sh
[2021-06-21T22:27:09.484Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-rum/elastic-synthetics/PR-311/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-rum/elastic-synthetics/PR-311/runs/5 ABORTED 1604931
[2021-06-21T22:27:09.484Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-rum/elastic-synthetics/PR-311/runs/5/steps/?limit=10000 -o steps-info.json
[2021-06-21T22:27:09.484Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-rum/elastic-synthetics/PR-311/runs/5/tests/?status=FAILED -o tests-errors.json

Copy link
Copy Markdown
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

Left some thoughts on code quality improvements, have yet to run it, but will do so soon!

* by reporter.
*/
if (options.reporter == 'json') {
if (options.reporter === 'json') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weird that the linter missed this

@vigneshshanmugam
Copy link
Copy Markdown
Member Author

E2E failures is unrelated, have to look in to that separately.

Copy link
Copy Markdown
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM pending a minor fix on var naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants