axe DevTools Reporter CLI

Link to axe DevTools Reporter CLI copied to clipboard

Generate static HTML reports from your axe DevTools Mobile scans.

axe DevTools Reporter Command Line Interface (CLI)

axe DevTools Reporter CLI has taken the reporting power available in axe DevTools CLI and brought it into a lightweight, standalone CLI.

How it Works

axe DevTools Reporter CLI accepts a set of scans, generated from running your automated tests with axe DevTools Mobile, and builds a stand-alone HTML report. The HTML report includes an executive summary of the scans, along with the capability to dive into each scan individually for a more targeted look. The HTML report can be shared with anyone, licensed user or not!

Grab some scan files as JSON to get started:

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

Setup

The Reporter is available as a direct download or NodeJS package.

tip

Looking to set up the reporter in your continuous integration and deployment pipeline? Check out our guide to Generate Reports with CI/CD.

Direct Download

  1. Download the latest release
  2. Open the command line and navigate to the executable's location
  3. Find your operating system below and enter the command to test the installation
    • ** 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
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`.

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 content.

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

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

tip

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