This is a example of Test Automation Testing for Accessibility with Cypress using Cypress-Axe and Axe-Core, developed by Douglas Urrea Ocampo using Cypress as framework. Besides I am testing a Democart homepage to practicing writing advanced tests in Cypress
- Name:
Douglas Urrea Ocampo
- Country:
Colombia
- City:
Medellin
- E-mail: Contact me here
- LinkedIn: https://www.linkedin.com/in/douglasfugazi
- Contact: https://douglasfugazi.co
- Install Node.js from here
- Install npm from here
- Install git from here
- Install Cypress from here
- Install Cypress-Axe from here
- Download the project from GitHub
- Option 1:
git clone https://github.com/fugazi/Accessibility-Automation
- Option 2: Download it as a Zip file and extract it
- Option 1:
- CD into the
Accessibility-Automation
folder - Set up environment variable
APPLITOOLS_API_KEY
with your own API key.- Login to Applitools > Click on the Person icon > My API Key
- Option Linux/Mac:
export APPLITOOLS_API_KEY=<your_key>
- Option Windows:
set APPLITOOLS_API_KEY=<your_key>
- Option Manual: Open the file
applitools.config.js
and add theapiKey:''
- run
npm install
- run
npx eyes-setup
- run
npm test
Please see Test Automation for Accessibility for all the details.
- Cypress project Baseline:
accessibility-test.cy.js
into foldercypress\e2e
- Cypress project Checkpoint Hook:
accessibility-test-hook.cy.js
into foldercypress\e2e
- Cypress project Checkpoint Rules:
accessibility-test-rules.cy.js
into foldercypress\e2e
- batchName:
Democart for Accessibility
- appName:
Opencart
- testName:
Cypress Accessibility