zr-cypress-tests 中文文档教程
自述文件
利用 Cypress 和 Axe 执行自动化可访问性测试
如何进行设置?
- 确保 AVN 已激活节点 18.12.1
- 安装依赖项:
npm install
运行 Cypress Ax Accessibility 测试
npx cypress open
打开交互式 Cypress 仪表板。- 选择 E2E 测试并选择浏览器
- 在 cypress/e2e 目录中编写并运行测试。
cypress run --record --browser chrome --key c11f7f50-efc2-40c6-a592-ad950f008761
运行并记录测试。control + C
停止 cypress。
赛普拉斯仪表板
- 要查看记录的测试运行,请访问
https://cloud.cypress.io/organizations/50ef64a5-e5b2-4024-9582-4a2187c5b651/projects
- 登录凭据位于 Lastpass *
赛普拉斯资源
- 文档中 <代码>cypress run:https://docs.cypress.io/guides/guides/command-line#cypress-run
- 将cypress与axe一起使用:https://timdeschryver.dev/blog/setting-up-cypress -with-axe-for-accessibility#configuration
README
Leverage Cypress and Axe to perform automated accessibility tests
How do I get set up?
- Ensure that AVN has activated node 18.12.1
- Install dependencies:
npm install
Running Cypress Axe Accessibility tests
npx cypress open
opens the interactive Cypress dashboard.- select E2E Testing and choose a browser
- Write and run tests in the
cypress/e2e
directory. cypress run --record --browser chrome --key c11f7f50-efc2-40c6-a592-ad950f008761
runs and records tests.control + C
stops cypress.
Cypress Dashboard
- To view recorded test runs, go to
https://cloud.cypress.io/organizations/50ef64a5-e5b2-4024-9582-4a2187c5b651/projects
- Login credentials are in lastpass *
Cypress Resources
- Documentation on
cypress run
: https://docs.cypress.io/guides/guides/command-line#cypress-run - Using cypress with axe: https://timdeschryver.dev/blog/setting-up-cypress-with-axe-for-accessibility#configuration