The Test Runner

Learn how the test runner in Cypress is built and how we can use it to its full potential.

So far, we’ve only looked into how to deal with test cases, but we haven’t used the test runner. Let’s change that and see how it can help us visualize our tests and troubleshoot any failing test cases.


Overview of the Test Runner

import {
    verifyCookiePolicyPresence,
    dismissCookiePolicy
} from '../steps/cookiePolicy'

describe('Homepage', () => {
    before(() => {
        cy.visit('https://cypress.io');
    });

    it('Should show dismissible cookie policy banner', () => {
        verifyCookiePolicyPresence();
        dismissCookiePolicy();
    });
});

If you remember from the “Installing Cypress” lesson, we’ve added a script to our package.json file that opens the Cypress test runner for us. Once open, you will be greeted with a dashboard showing all of the integration tests.

The front page of the test runner
The front page of the test runner

Let’s take a look at this picture and analyze what we have on the dashboard:

  1. At the top of the right-hand side corner, we have a “Support” and “Docs” button that can help us quickly
...