Creating and Filtering Reports Using the axe DevTools CLI

Link to Creating and Filtering Reports Using the axe DevTools CLI copied to clipboard

The reporter command can generate and filter a variety of report types from axe's JSON results.

DevTools Reporter

When you use axe DevTools APIs to generate JSON results, you can use the axe reporter command to convert and filter those JSON results to HTML, CSV, and JUnit XML reports.

note

If you are using axe DevTools CLI to generate JSON results when testing pages and workflows, you can use the --format flag directly. See CLI Page Tests for more information on testing pages with the CLI.

The following example will find all axe JSON results in ./axe-reports/json/ and create a CSV report, which will be saved in ./axe-reports/csv/

axe reporter ./axe-reports/json/ ./axe-reports/csv/ --format=csv

-d --dest [path]

Specify the desired output path. This option is not required, and if you do not specify it, axe reporter uses the second directory specified as the destination directory (as shown in the example above).

-f --format [type(s)]

Format(s) for output: html, junit (xml), CSV (csv). Optionally multiple formats can also be specified as comma separated values.

Example

axe reporter ./axe-reports/json/ ./axe-reports/csv/ --format=csv,html,xml

--filter [type(s)]

Provide a list of result types to filter from results: passes, violations, incomplete, or inapplicable.

note

The --format csv option is required if you want to use the filter option.

Example

axe reporter ./axe-reports/json/ --format=csv --filter passes,inapplicable

-b --browser [name]

Specify which browser's results should be used to generate the output.