Add option to only process and save videos on test failure
See original GitHub issueThis seems like an obvious request, but I wasn’t able to find it from searching, please delete if it’s a duplicate.
Current behavior:
When video recording is on, all recorded videos are processed/compressed and saved. This works fine, but as our test suite starts to grow our CI job is spending a lot of time on processing/compressing videos. Having the video is great for debugging a failure in CI, but we don’t care about the videos for passing tests.
Desired behavior:
Have an option besides true/false for the video
setting in cypress.json
, maybe something like onlyOnFail
. https://docs.cypress.io/guides/references/configuration.html#Videos
This setting would make the cypress runner throw the video away as soon as a spec passes and save us the time of compressing and the storage space of storing the video.
Versions
Cypress 3.0.2 Jenkins 1.642.4 Electron 59
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:8 (3 by maintainers)
Top GitHub Comments
Hey, this is already a feature, but probably not as clear as it should be.
You can set
videoUploadOnPasses
tofalse
, which would only process, compress, and upload videos when recording if there are failures within the spec.Line of code I tracked this down to: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/modes/run.coffee#L497
I can see how the docs are not clear that this configuration correlates to the video processing and compression though, so I created a new issue in our docs to document this here: https://github.com/cypress-io/cypress-documentation/issues/815. Our documentation is open source and contributions are welcome. 😄
Is there a way to save videos only for failing tests, if the dashboard service is not used? If I understand the docs correctly, the videoUploadOnPasses can only be used with the dashboard service.