Use Reporter CLI with Automated Testing

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard
Not for use with personal data

Adding accessibility checks to your automated tests will allow your team to shift left, ensuring your apps are always accessible for your users. When you incorporate Deque's tools in your testing pipeline, you are able to save results locally as a JSON file.

With these results already saved, you can then use the Reporter CLI to generate accessibly formatted HTML reports to share with the rest of your team.

Review the steps for saving scan results locally with:

Use Results in a Pipeline

Learn how you can generate self-contained HTML reports within your continuous integration / continuous deployment (CI/CD) pipeline.

Use Results for Local Testing

When you are ready to create an HTML report, ensure all the relevant scans are in a shared directory. Open a terminal window and navigate to the directory where you saved the axe Reporter CLI executable.

For example - if the executable is in your 'Downloads' folder, enter the following in the terminal:

cd Downloads

Now, run the following command:

./reporter-cli-<your-system> <devtools-results-directory> <output-directory> --format=html

Providing an output directory is optional, and if not included, the reports will be stored in ./axe-devtools-reporter.

The output directory will be populated with reports corresponding to each JSON results file, as well as an executive report. File names for individual reports are derived from the scan name and the scan's analysis timestamp: ${scanName}-axe-result-${timestamp}.html.

You will always append the --format flag when you run the ./reporter-cli-<your-system> command. In addition to creating HTML reports, you can also export the data for XML/JUnit or CSV.

HTML:

./reporter-cli-<your-system> <devtools-results-directory> <output-directory> --format=html

XML/JUnit:

./reporter-cli-<your-system> <devtools-results-directory> <output-directory> --format=junit

CSV:

./reporter-cli-<your-system> <devtools-results-directory> <output-directory> --format=csv