axe DevTools Reporter CLI

Link to axe DevTools Reporter CLI copied to clipboard

Generate static HTML reports from your axe DevTools Mobile scans.

tip

Checkout our guide to Generate Reports with CI/CD.

axe DevTools Command Line Interface (CLI)

Is your team already using the axe DevTools CLI? It now supports generating HTML reports from axe DevTools Mobile scans. Provide the CLI a directory that contains your mobile scans as JSON files.

JSON files can be obtained from two sources:

  1. Exporting scans from the axe DevTools Mobile dashboard
  2. Saving results locally within your automated test run

See the axe DevTools CLI documentation for more information.

axe DevTools Reporter CLI

axe DevTools Reporter CLI has taken the reporting power available in axe DevTools CLI and brought it into a lightweight, standalone CLI. The Reporter is available as a direct download or NodeJS package.

Direct Download

Find your operating system in the subsections below. Once the axe DevTools Reporter CLI is downloaded from Deque's Aftifactory, open the command line and navigate to the executable's location. Use the command below the download link to test the installation.

tip

Administrator Mode
Depending on your machine's configuration, you may need to use administrator mode.

Enable Global Installation
Make axe DevTools Reporter CLI available globally from any directory by placing it in a directory in your system's $PATH. You can see which directories are in your system's $PATH by running `echo $PATH`.

Download the latest release.

On Windows

Test the installation with:

./reporter-cli-win.exe --help

On Linux

Test the installation with:

./reporter-cli-linux --help

On macOS

Test the installation with:

./reporter-cli-macos --help

NodeJS Package

important

Requirements

  • NodeJS
  • npm or yarn

Artifactory Configuration

axe DevTools Mobile customers can utilize Deque's artifactory to download axe DevTools Reporter CLI via npm or yarn.

Using your Deque credentials, log in to agora.dequecloud.com, Deque's private artifactory.

  1. In the top right, click on your user.
  2. Select Edit Profile from the dropdown.
  3. Copy the API Key to the clipboard or refresh to grab a new one.

Next, you will need to compile your authentication information into your ~/.npmrc file. With this curl command, you can automatically generate the required contents.

curl -u "<your-email>":<your-api-key> "https://agora.dequecloud.com/artifactory/api/npm/auth"

The return of the command should look like this:

_auth =<generated-auth-string>
always-auth=true
email=<your-email@email.com>

If you are unable to execute curl commands, you can generate your auth string by base-64 encoding <your-email>:<your-api-key>.

Now, open your ~/.npmrc file for editin and add the information from the previous steps. The final product should look like this:

@axe-devtools:registry=https://agora.dequecloud.com/artifactory/api/npm/devtools-npm/
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:_auth=<generated-auth-string>
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:email=<your-email@email.com>
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:always-auth=true

Installation

To install axe DevTools Reporter CLI globally, run this command

npm install @axe-devtools/reporter-cli -g

or with Yarn

yarn add @axe-devtools/reporter-cli -g

Generating Reports

tip

Be sure to checkout executive-report.html to view the combined results of all scans within the suite.

Once you gather axe DevTools Mobile scans as JSON files, you're ready to build a report. Ensure all the scans are in a directory, then run the following command to generate the HTML reports:

axe-devtools-reporter <devtools-results-directory> <output-directory> --format=html

The reports are stored in ./axe-devtools-reporter by default unless an output directory was provided. The output directory can also be specified using the flag -d —destination [path].

Filenames are derived from the scan name and the scan's analysis timestamp. ${scanName}-axe-result-${timestamp}.html