Cypress – Test Runner

Cypress Test Runner helps to trigger the test execution. As we complete Cypress installation, there comes a suggestion from the tool on the terminal, as mentioned below −

You can open Cypress by running − node_modules/.bin/cypress open

To open the Test Runner, we have to run the below-mentioned command −

node_modules/.bin/cypress open

The Test Runner window opens up after some time with the message that a sample project folder structure has been provided by Cypress under the examples folder.

Click on the OK, got it! button. The screen that will appear on your computer would be as follows −

Then the Test Runner is launched, with the more than one spec files available under the examples folder, as stated below −

To run a specific file, for example, test2.spec.js, we have to click it. Also, the browser and the option to Stop the execution are available.

The execution shall begin with the following screen showing the test steps, name of the test case, test suite, URL, test duration, dimension of the browser, and so on.

Leave a Reply