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

Cannot pass record key through CYPRESS_RECORD_KEY variable (local dev mode) #820

Closed
bahmutov opened this issue Oct 26, 2017 · 2 comments
Closed
Assignees
Labels
cli type: bug type: unexpected behavior User expected result, but got another
Milestone

Comments

@bahmutov
Copy link
Contributor

bug

When working inside this repository and trying to record a run, the record key is not read from the environment variable CYPRESS_RECORD_KEY.

steps to reproduce

  1. clone a sample project for example git clone https://github.com/cypress-io/cypress-test-tiny.git /tmp/cypress-test-tiny
  2. try running tests in the /tmp/test from the root of this repository AND record it (because we are working against local API without running it, just use fake "foo" and "bar").
CYPRESS_PROJECT_ID=foo npm start -- --run-project /tmp/cypress-test-tiny --record --key bar

Everything is working and the test is running.

  1. try passing record key via environment variable CYPRESS_RECORD_KEY (see https://docs.cypress.io/dashboard/overview/projects-dashboard.html#Record-Test-Runs)
CYPRESS_PROJECT_ID=foo CYPRESS_RECORD_KEY=bar DEBUG=cypress:* npm start -- --run-project /tmp/cypress-test-tiny --record

and you get the following error message

You passed the --record flag but did not provide us your Record Key.

You can pass us your Record Key like this:

  cypress run --record --key <record_key>

You can also set the key as an environment variable with the name CYPRESS_RECORD_KEY.

https://on.cypress.io/how-do-i-record-runs

Hmm, weird that this fails in local development mode, but works just fine in compiled binary.

@bahmutov bahmutov self-assigned this Oct 26, 2017
@bahmutov bahmutov added cli stage: investigating Someone from Cypress is looking into this type: bug type: unexpected behavior User expected result, but got another labels Oct 26, 2017
@bahmutov
Copy link
Contributor Author

bahmutov commented Oct 26, 2017

Hmm, in local dev mode when using start we are going through scripts/start.js which is very different from CLI logic

@brian-mann
Copy link
Member

Fixed in 1.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli type: bug type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

3 participants