Video recorded on every cypress run
.
CLI and/or config option to disable video recording on cypress run
.
Run cypress run
. See "Started video recording" message and generated video file in cypress/videos
.
I'm not using the videos while developing and I'd rather save the time/processing and lower my chances of running into associated bugs by disabling this functionality altogether when I need to run all tests.
You can already disable video recording with proper configuration in your cypress.json file (doc) : "video": false
.
You can also do it with CLI by overriding your cypress.json
.
Edited by @jennifer-shehane to update key videoRecording
to new version 3 key video
@MarcLoupias Thanks! Not sure how I missed that.
Thanks everyone for this issue as I ran into it as well. However, I do have some thoughts here on usability (but maybe my expectations are wrong):
--record
specifies "whether to record the test run". With that in mind, I'd expect it to not record the test run with --record
is not passed as an option, or, at least let me disable it a la cypress run --record false
.Doing it via config override totally does the trick, it's just less comfortable and to be honest, I didn't run into the overriding docs when searching for such a feature. Frankly I didn't actually search for "overriding config" but rather "how do disable video recording in cypress run
".
Again, my expectations may be wrong here. I'm just leaving it here as feedback :)
@PascalPrecht There's another issue open that talks about how "recording" and "video recording" is confusing nomenclature.
What it's really saying is two different things. --record
is about recording the run details on our Dashboard Service to which you'd have to setup your project to record and explicitly opt in.
By default Cypress takes a video of the run without any flags -- thats the video recording feature. You can turn that off with configuration or CLI flags. --config videoRecording=false
The --record
is for recording test results _on the dashboard_. Which is separate from video recording for example. The way I usually set this up (because I don't want to record video locally when testing)
test: cypress run
script in the package.json filenpm test -- --record
and set CYPRESS_RECORD_KEY=<private record key>
environment variable _and_ CYPRESS_VIDEO_RECORDING=1
to enable video recording on CIhahaha @brian-mann we posted together!
@PascalPrecht here's the other issue for reference https://github.com/cypress-io/cypress/issues/562
Thanks for the clarification! This all makes total sense. I assume tho then, that this has potential for improvement. Not sure if I'm the only one who got confused by this.
videoRecording
is now renamed to video
(if someone stumbles upon this issue)
For the “record”, it is still videoRecording in 3.0.1 .
Hey @aries1980, what key are you referring to? Where are you using the videoRecording
key in 3.0.1?
If you were to use the videoRecording
key in your configuration in Cypress version 3.0+, you should see this error:
A configuration option you have supplied has been renamed.
Please rename videoRecording to video
It's still videoRecording
in the doc: https://docs.cypress.io/guides/core-concepts/screenshots-and-videos.html#Videos
I created a new issue in our docs to document the incorrect key reference here: https://github.com/cypress-io/cypress-documentation/issues/1030. Our documentation is open source and contributions are welcome. 😄
Thank you. @jennifer-shehane :)
cypress run --config video=false
Most helpful comment
You can already disable video recording with proper configuration in your cypress.json file (doc) :
"video": false
.You can also do it with CLI by overriding your
cypress.json
.Edited by @jennifer-shehane to update key
videoRecording
to new version 3 keyvideo