Skip to main content

jaffamonkey

Pa11y CI

Pa11y CI is a command-line CI-friendly tool to run against urls and supports basic scripting.

Installation

npm install -g pa11y-ci
npm install -g pa11y-ci-reporter-html"

Creating a configuration file

The configuration below is example when a site requires authentication, and will first run a login script, before checking all subsequently listed pages.

pa11y_config_example.js

{
"defaults": {
"chromeLaunchConfig": {
"ignoreHTTPSErrors": true
},
"useIncognitoBrowserContext": false,
"includeWarnings": true,
"timeout": 180000,
"wait": 60000,
"concurrency": 1,
"standard": "WCAG2AA",
"runners": [
"htmlcs"
],
"reporters": [
"pa11y-ci-reporter-html"
]
},
"urls": [
{
"url": "https://www.sitewithalogin.com",
"actions": [
"wait for #login_id to be visible",
"set field #login_id to auser@asite.co.uk",
"set field #password to Password1",
"click element #submit",
"wait for #user_avatar to be visible"
]
},
"https://www.sitewithalogin.com/page1",
"https://www.sitewithalogin.com/page2",
"https://www.sitewithalogin.com/page3",

]
}

Running Pa11y CI

pa11y-ci --config pa11y_config_example.js

Sample report

Pa11y CI report

More resources

Here are a couple more resources, or check out the full list.

  1. Superagent API testing

    Superagent is a small progressive client-side HTTP request library, and Node.js module with the same API, supporting many high-level HTTP client features.

  2. Artillery load test

    Artillery is a scalable, flexible and easy-to-use platform that contains everything you need for production-grade load testing.