How to Use Cypress Dashboard for Test Monitoring
To use the
Cypress Dashboard, first create an account on the Cypress Dashboard website and connect your project by running npx cypress open and linking your project. Then, run tests with cypress run --record --key <record_key> to upload results and view detailed test reports, videos, and screenshots on the dashboard.Syntax
The basic commands to use Cypress Dashboard are:
npx cypress open: Opens Cypress Test Runner and helps link your project to the dashboard.cypress run --record: Runs tests in headless mode and records results to the dashboard.--key <record_key>: Provides your unique project record key to authenticate uploads.
These commands connect your local tests to the Cypress Dashboard service for monitoring.
bash
npx cypress open cypress run --record --key <record_key>
Example
This example shows how to run Cypress tests and upload results to the dashboard.
First, open Cypress and link your project:
npx cypress open
Follow the prompts to create or connect to a dashboard project.
Then, run tests with recording enabled:
bash
npx cypress run --record --key abc123def456
Output
====================================================================================================
(Run Starting)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cypress: 12.17.0 โ
โ Browser: Electron 112 (headless) โ
โ Specs: 1 found (example_spec.cy.js) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Running: example_spec.cy.js (1 of 1)
โ visits the example page
1 passing
(Results)
Video: true
Screenshots: true
(Run Finished)
====================================================================================================
(Uploading Results to Cypress Dashboard)
View your test run results at: https://dashboard.cypress.io/projects/your-project-id/runs/123
Common Pitfalls
Common mistakes when using Cypress Dashboard include:
- Not setting the
--recordflag when running tests, so results are not uploaded. - Forgetting to provide the correct
--keyfor your project, causing authentication errors. - Running
npx cypress openwithout linking your project to the dashboard first. - Expecting dashboard features without a valid Cypress Dashboard account or project setup.
Always verify your project is linked and your record key is correct.
bash
Wrong: cypress run Right: cypress run --record --key abc123def456
Quick Reference
| Command | Purpose |
|---|---|
| npx cypress open | Open Cypress Test Runner and link project to dashboard |
| cypress run --record --key | Run tests and upload results to Cypress Dashboard |
| Visit https://dashboard.cypress.io | View test results, videos, and screenshots |
| --record | Flag to enable recording test runs |
| --key | Your unique project key for authentication |
Key Takeaways
Always link your project to Cypress Dashboard using 'npx cypress open' before recording runs.
Use 'cypress run --record --key ' to upload test results to the dashboard.
Check your record key carefully to avoid authentication errors.
The dashboard shows detailed test reports, videos, and screenshots for easy debugging.
Without the '--record' flag, test results will not be uploaded to the dashboard.