Skip to content

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

Description

@bahmutov

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions