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 examples folder.

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

Test Runner

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

Files

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.

test2.spec.js

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

Dimension of Browser
Advertisements