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

Should be a way to skip video encoding entirely if the test suite passes #15815

Open
kaiyoma opened this issue Apr 6, 2021 · 5 comments
Open
Labels
E2E Issue related to end-to-end testing stage: proposal 💡 No work has been done of this issue topic: video 📹 type: feature New feature that does not currently exist

Comments

@kaiyoma
Copy link

kaiyoma commented Apr 6, 2021

What would you like?

There should be a way to skip video encoding entirely if the test suite passes. I know that there is a videoUploadOnPasses configuration option, but this only applies to Dashboard, which we don't use. As per #2522 there is a way to use the after:spec event to delete video files for passing suites, which is a bit helpful in terms of freeing up disk space, but is still wasteful in general.

Why is this needed?

Compressing and saving a video file, only to delete it a second later, is wasteful of time, memory, and processing power. There should be a way to skip this process entirely.

@csvan
Copy link

csvan commented Apr 6, 2021

You can set compression to 0 to skip the encoding process, which should save some CPU time.

@kaiyoma
Copy link
Author

kaiyoma commented Apr 6, 2021

You can set compression to 0 to skip the encoding process, which should save some CPU time.

That sounds like a potentially worthwhile temporary hack. I'll try it out!

Edit: Of course, this can create other problems when tests fail and the resulting videos take up a lot more disk space.

@sainthkh sainthkh added stage: proposal 💡 No work has been done of this issue topic: video 📹 labels Apr 27, 2021
@jennifer-shehane
Copy link
Member

I was just revisiting this issue and a couple things to note as workarounds:

  • You can set videoCompression: false to skip compression of all videos, this would save time on a test run since compression takes time, as noted in the "Processing" output of a test.
  • videoUploadOnPasses, while this option appears that it should only apply to runs with the --record flag to the Cloud, in actuality this flag also skips the video compression for runs that are not recorded to the Cloud. You could pass this flag and skip compression of videos that are from passing specs, then delete them in an 'after:spec' hook.

I recognize this would not be at all obvious from the naming, but I did want to offer what we found while experimenting that could be a solution today.

@csvan
Copy link

csvan commented Apr 21, 2023

@jennifer-shehane is there any functional different between setting videoCompression to false or 0?

@nagash77 nagash77 added type: feature New feature that does not currently exist E2E Issue related to end-to-end testing labels Apr 21, 2023
@emilyrohrbough
Copy link
Member

@csvan videoCompression set to false and 0 behave the same. This was corrected in Cypress v12.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing stage: proposal 💡 No work has been done of this issue topic: video 📹 type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

6 participants