question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to only process and save videos on test failure

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Reactions:35
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

31reactions
jennifer-shehanecommented, Aug 3, 2018

Hey, this is already a feature, but probably not as clear as it should be.

You can set videoUploadOnPasses to false, 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. 😄

28reactions
pascalbe-devcommented, Dec 17, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Record video only for failed test cases - cypress - Stack Overflow
As far as I know, Cypress doesn't have the option to only keep videos for a failed test over a passing one -...
Read more >
Working with Test Studio (contains video) - Power Apps
Save your app to Power Apps to open Test Studio. ... Select Insert a step above from the top menu or by selecting...
Read more >
Reviewing and Customizing Load Test Results - SOAtest 2022.2 ...
If the Load Tests tab is not active, right-click anywhere in the Projects tab and select Create Load Tests from the shortcut menu....
Read more >
Running a t-test in Excel
Click on the “Data” menu, and then choose the “Data Analysis” tab. You will now see a window listing the various statistical tests...
Read more >
Configuration - Cypress Documentation
Turn this off if you'd like to only upload the spec file's video when there are failing tests. Downloads. Option, Default, Description. downloadsFolder,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found