Binary Reporter CLI Reference

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

Arguments and options for the Axe DevTools Binary Reporter (reporter-cli)

Not for use with personal data

The Axe DevTools Binary Reporter is a standalone executable that turns the JSON accessibility results saved by an Axe DevTools for Web integration into HTML, JUnit XML, CSV, or EARL reports. It is the same reporter as the @axe-devtools/reporter package, packaged so that you can run it from any language's test suite without installing Node.js. The Java and C# report guides show how to call it from a test run.

Download the executable for your operating system from Binary Reporter on the Downloads page, and see Preparing Binaries after Download before you run it. The executables are named reporter-cli-linux, reporter-cli-macos, reporter-cli-macos-arm64, and reporter-cli-win.exe.

note

The Binary Reporter is a different tool from the Axe DevTools CLI. The CLI's axe reporter subcommand has its own options, which are described in Creating and Filtering Reports.

Usage

reporter-cli-<platform> <results-directory> [<output-directory>] --format <format> [options]

Arguments

  • <results-directory> (required): The directory that holds the JSON results files written by your integration's logger, such as the outputDirectory you configured in Java.
  • <output-directory> (optional): The directory to write the report to. It is created if it does not exist. If you give both this argument and --destination, this argument is used. If you give neither, the report is written to axe-devtools-reporter in the current directory.

Options

  • --format (-f): The format of the report to create. This option is required, and a run without it fails with Missing required flag.
    • Values: html, junit (xml and junitxml are accepted too), csv, or earl. Values are not case-sensitive.
    • Give one format per run. See Creating more than one format.
  • --destination (-d): The directory to write the report to, as an alternative to the <output-directory> argument.
  • --filter: A comma-separated list of the result types to include in the report, for example --filter passes,violations.
    • Values: passes, violations, incomplete, inapplicable.
    • Only works with --format csv. With any other format, the run fails with --filter is only supported when --format includes "csv".
  • --browser (-b): Includes only the results recorded with this user agent. The value must exactly match the full user agent string saved in the results files, not a browser name such as chrome.
  • --browser-binary: The path to a Chromium-based browser executable used to pre-render HTML reports. Added in version 4.15.0.
    • Environment variable: AXE_DEVTOOLS_REPORTER_BROWSER_PATH.
    • For how the reporter chooses a pre-rendering method when you don't give a browser, see Pre-rendering HTML reports.
  • --no-sandbox: Disables the browser sandbox while pre-rendering HTML reports. The sandbox is on by default. Only use this option in a trusted, constrained environment, such as a container, where you control the input. Added in version 4.15.0.
    • Environment variable: AXE_DEVTOOLS_REPORTER_BROWSER_NO_SANDBOX.
  • --no-auto-detect-browser: Stops the reporter from using a browser it finds installed on the machine. Without --browser-binary, HTML pre-rendering is skipped instead. Added in version 4.15.0.
    • Environment variable: AXE_DEVTOOLS_REPORTER_BROWSER_AUTO_DETECT (set it to a falsy value).
  • --help: Prints a usage summary.
  • --version: Prints the reporter version.

The three pre-rendering options correspond to the browserPath, noSandbox, and autoDetectBrowser render options of the Node.js reporter. When you leave an option out, its environment variable still applies.

Output files

The reporter writes these files to the output directory:

Format Files
html One HTML report per results file, plus executive-report.html
junit axe-devtools-results.xml
csv axe-devtools-results.csv
earl axe-devtools-results.earl.json

Examples

Create a CSV report that contains only violations:

./reporter-cli-linux ./axe-results ./a11y-reports --format csv --filter violations

Create an HTML report, pre-rendered with a specific browser:

./reporter-cli-linux ./axe-results ./a11y-reports --format html --browser-binary /usr/bin/chromium

Troubleshooting

A run fails with "File at ... already exists"

Each run writes intermediate files named devtools-reporter-<name>-devtools.json into the results directory, next to your results files. When those files are already there from an earlier run, the next run against the same directory fails with File at <path> already exists. Delete the devtools-reporter-*-devtools.json files from the results directory, and then run the reporter again. Your own results files are not affected.

Creating more than one format

The reporter creates one format per run. Passing a comma-separated list (--format csv,junit) fails with The format option provided csv,junit is not supported, and repeating --format creates the first report and then fails with File at <path> already exists. To get several formats from the same results, run the reporter once per format and delete the devtools-reporter-*-devtools.json files from the results directory between runs.

Getting more help

If issues with the reporter persist, contact your Deque representative directly, reach us via our support desk, or send us an email.

See Also