-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[feature request] Allow setting --record
switch with env var
#4876
Comments
I'm happy to dive in, implement it and open pull request if this would be accepted |
Yes, this sounds like a great use case. We would happily accept a PR. |
Sure, this feature sounds fine. We would accept a PR for this or one of our devs could likely knock it quickly. At the moment I suggest you writing your own |
If anybody ever gets around to this, it seems to me it would make sense to tackle #938 at the same time: Make it possible to set |
Any solution for this one This project is missing the projectId inside of: cypress.config.ts We cannot uniquely identify this project without this id. You need to setup this project to record. This will generate a unique projectId. Alternatively if you omit the --record flag this project will run without recording. |
You should be able to follow the documentation on https://docs.cypress.io/guides/cloud/getting-started#Setup in order to set up Cypress to record to the Cypress Cloud.
|
Current behavior:
Right now you can specify Project ID and key with env vars (
CYPRESS_PROJECT_ID
,CYPRESS_RECORD_KEY
). But you do need to use CLI--record
switch to actually make use of them. If you use--record
flag without those env vars you get error:This makes it challenging (or messy) to use scripts that would work when those env vars are set and when they are not. In our setup we want to record runs to dashboard only when run in CI and not when running them locally (to not pollute dashboard with any test runs that devs will run locally when testing their changes.
As solution/workaround we use scripts like
"cy:run": "(is-ci && cypress run --browser chrome --record) || cypress run --browser chrome"
to apply--record
switch only in CI. ( gatsbyjs/gatsby#16190 )Desired behavior:
I'd like to be able to use env var like
CYPRESS_RECORD=true
to control all recording related options with env vars.Steps to reproduce: (app code and test code)
--record
switch)CYPRESS_PROJECT_ID
,CYPRESS_RECORD_KEY
in your CI setupVersions
cypress
:3.3.2
The text was updated successfully, but these errors were encountered: