Your guide to run the first Cypress test with reporting to Zebrunner.
Before configuring Zebrunner Cypress reporting agent, you need to create a free Zebrunner workspace at https://zebrunner.com/
Clone the Zebrunner's samples repository and navigate to the code directory as shown below:
git clone https://github.com/zebrunner/javascript-agent-samples.git
cd javascript-agent-samples/sample-cypress
In Zebrunner:
- Navigate to "Account and profile" section by clicking on the User icon from the top right side;
- Click on "API Tokens" tab;
- Press "Token" button, create a token and copy it before closing the dialog (you won't be able to see the token later).
Define launch configuration (override defaults if needed) and copy content below to the list of reporters to the cypress.json
file
"reporterOptions": {
"reportingServerHostname": "https://<workspace>.zebrunner.com/",
"reportingServerAccessToken": "<accessToken>",
"reportingProjectKey": "<project_key>",
"reportingRunEnvironment": "DEMO",
"reportingRunBuild": "2.41.2.2431-SNAPSHOT",
"reportingRunDisplayName": "Zebrunner Demo Launch"
}
Please run the following command in the terminal
npm install && npx cypress run --headed --spec cypress/integration/basic.cy.js
Congratulations! You have just completed reporting setup for a test project! Now you can go to the Launches page to see the results.
Note: Video will be available only for tests launched via launcher!
To learn more about advanced reporting capabilities, test cases mapping and more please go to the documentation.