Cypress Reporter for SpiraTest Now Available

7-Sep-2022 by Adam Sandman Product News

Cypress IO is a user-friendly test automation tool for end to end testing, UI testing, regression suites, and integration and unit testing. It's simple to install and doesn't require any changes to your code. Cypress prides itself on writing tests quickly and in real-time as you build your web application.

We have just released a new SpiraTest custom reporter extension for Cypress that lets you execute your Cypress scripts as normal and have the results automatically reported back into SpiraTest as test runs against mapped test cases. In addition to the detailed test results, the custom reporter automatically attaches any screenshots generated by Cypress to the SpiraTest test run. Of course, the reporter works with all flavors of Spira: SpiraTest, SpiraTeam and SpiraPlan.

Running a Cypress Test

You can execute the tests using the Cypress command-line, launch-pad, CI tool or whatever method you currently use. For example, to execute one of the sample tests in this repository, you can use:

npx cypress run --browser edge --spec "cypress\e2e\1-getting-started\todo.cy.js"

to run the entire folder of tests, you can use:

npx cypress run --browser edge --spec "cypress\e2e\1-getting-started"

The system will then execute the test and let you know that it is reporting back to Spira:

Viewing the Results in Spira

Once the Cypress tests have finished running, you can view the results in Spira:

If you click on one of the runs, you will see the details of that specific execution, including the pass/fail steps and the actions recorded:

In addition, if you choose one of the failed runs, you will see that any screenshots have been automatically uploaded as well:

If you click on the picture link, you can view the uploaded image/screenshot directly in Spira:

To learn more about downloading, installing and using the Inflectra Spira Reporter for Cypress, go to the public GitHub repository. If you'd like to make changes, please feel free to fork the repo.