Accessibility Automation on Cypress
Quick start guide to integrate BrowserStack Accessibility Automation with Cypress
Pre-requisites
- You have an account with BrowserStack (even a free trial works) and can get your Username and Access Key from Account & Profile.
- You have a Cypress version 10 or above test suite which is running on BrowserStack Automate.
Integrate with Accessibility Automation
Follow the steps below to get started with adding Accessibility Automation to your test suite:
Follow these steps to start using BrowserStack Accessibility Automation with your existing setup of Cypress tests running on BrowserStack Automate:
Install the latest version of the browserstack-cypress-cli npm package
Update the browserstack-cypress-cli
using the following commands. Please ensure you have a minimum of v1.26.0 before proceeding.
Make changes to the browserstack.json file
If you’ve installed the browserstack-cypress-cli
for the first time, you’d have to create the browserstack.json
file in the root of your directory. Else, just verify that your config file has all the required key-value pairs as in the following snippet:
The projectName and buildName config must be static and not change across different runs of the same build. This is a deviation in approach as specified by BrowserStack Automate since Accessibility Automation will automatically identify different build runs.
Accessibility testing will only run on Desktops (Mac & Windows) with Chrome 95 & above on Automate.
Make changes to the cypress.config.js file
You’ll need to make a minor modification to the cypress.config.js
file to import and use the Accessibility Automation plugin while your tests run. Ensure the lines mentioned in the sample file below are present in your config file.
Run your suite with BrowserStack Accessibility Automation
Use the existing command that you use to trigger a run as shown below and data will automatically start getting sent to BrowserStack Accessibility Automation:
Once the build has completed and the Accessibility report is ready, it will automatically get sent to the Accessibility Automation dashboard.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!