Search⌘ K

The Test Runner

Explore how to effectively use the Cypress Test Runner to visualize and manage your test cases. Understand the dashboard features, the automated browser, and the command log to troubleshoot and debug tests efficiently. This lesson guides you through running individual or multiple specs, inspecting application states, and leveraging built-in tools to improve your end-to-end testing workflow.

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 navigate to the official Cypress site for additional help.
  2. Below the “Support” and “Docs” buttons, we have a dropdown to select the browser we want to use for running
...