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

UI Tests: Enable screenshots in CI #93

Closed
4 tasks
murog opened this issue Apr 9, 2020 · 0 comments · Fixed by #372 or #373
Closed
4 tasks

UI Tests: Enable screenshots in CI #93

murog opened this issue Apr 9, 2020 · 0 comments · Fixed by #372 or #373
Labels
testing adds to unit, integration or e2e tests what/feature New feature or request

Comments

@murog
Copy link
Contributor

murog commented Apr 9, 2020

Description

Cypress UI Tests can generate screenshots for failing tests that are helpful for debugging. These should be pushed to storage and viewable by authors of PR's.

Expected Behavior

  • Screenshots are enabled
  • Screenshots are pushed to Storage Bucket
  • Links to screenshots are surfaced in logs
  • Screenshots are deleted on VM or CI has sufficient permission to delete screenshots on next build

Current Behavior

Screenshots are currently disabled because cypress docker container runs as root, resulting in artifacts that only root user can delete. When CI re-runs, it is unable to delete the screenshots directory from the previous build.

##[error]One or more errors occurred. (One or more errors occurred. (Access to the path '/home/user/actions-runner/_work/anthos-finance-demo/anthos-finance-demo/e2e/cypress/screenshots/login_spec.js/Bad Credentials on Form Submission -- fails with alert banner (failed).png' is denied.)) (Access to the path '/home/user/actions-runner/_work/anthos-finance-demo/anthos-finance-demo/e2e/cypress/screenshots/login_spec.js/Bad Credentials on Form Submission -- fails with alert banner (failed).png' is denied.)
##[error]Exit code 1 returned from process: file name '/home/user/actions-runner/bin.2.168.0/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Repository.v1_0.CheckoutTask, Runner.Plugins"'.

Possible solutions

  • Run cypress as non-root
  • Modify permissions on screenshots/ dir
  • Move screenshots out of _work dir (temp fix, would need to be cleaned up manually)
@murog murog added the what/feature New feature or request label Apr 9, 2020
@murog murog self-assigned this Apr 9, 2020
@murog murog removed their assignment Apr 13, 2020
@murog murog added this to the Release v0.2.0 milestone Apr 23, 2020
@murog murog added the testing adds to unit, integration or e2e tests label Apr 30, 2020
@murog murog modified the milestones: Release v0.2.0, Release v0.3.0 May 18, 2020
@murog murog changed the title E2E: Enable screenshots in CI UI Tests: Enable screenshots in CI Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing adds to unit, integration or e2e tests what/feature New feature or request
Projects
None yet
2 participants