-
Notifications
You must be signed in to change notification settings - Fork 42
Accessibility testing of docs part using Cypress locally
Navaneeth S Nair edited this page Oct 14, 2025
·
3 revisions
This guide explains how to set up and run accessibility tests for docs part of webpage using Cypress in your local environment.
- Open your terminal and navigate to the Cypress test directory:
cd src/test/cypressjs - Install the required dependencies:
npm install
- Install Cypress as a development dependency:
npm install cypress --save-dev
-
Update the following properties in
cypress.config.jsto your respective local directories:- supportFile
- specPattern
- downloadsFolder
For example:
specPattern: '/__w/openliberty.io/openliberty.io/src/test/cypressjs/cypress/e2e/**/*.cy.js'Change it to match your local path:
specPattern: '/Users/navaneeth/Documents/openliberty.io/src/test/cypressjs/cypress/e2e/**/*.cy.js'
- Launch Cypress using the following command:
npx cypress open
- The Cypress Test Runner window will open in Chrome.
- Choose E2E Testing.
- Select your preferred browser and click Start Testing.
- Pick the test file you want to run.
Tests will execute in the Cypress window.
- Results are stored locally in the following folder:
src/test/cypressjs/results - You can view:
- Individual test results in separate files.
- Overall summary in the
summary.jsonfile.