Uploading JSON Accessibility Results to axe Reports
Using the bulk-reports subcommand to upload results to axe Reports
You can use the CLI to send results to axe Reports with the subcommand bulk-reports. You'll need an API key, which is described in Obtaining an API Key.
To create the results files this command uses, see the section Generating Results below.
bulk-reports Command
axe bulk-reports <results-dir> --send-axe-reports --axe-reports-api-key <api-key>
axe Reports requires that the report directory contain JSON results files.
Example
axe bulk-reports ./results --axe-reports-api-key 720abdd2-03a3-41bf-b820-0cc38af67057 --send-axe-reports
Options
Option | Description |
---|---|
--send-axe-reports | Necessary to indicate the axe reports are to be uploaded in bulk. |
--axe-reports-api-key | The API key necessary to upload the reports to Deque's axe Reports service. |
--axe-reports-url | (Optional) Indicates the server's URL where the reports will be uploaded. |
Environment Variables
Variable | Description |
---|---|
AXE_REPORTER_API_KEY | Your axe Reports API key. For more information about obtaining an API key, see Obtaining an API Key. By putting your API key in an environment variable, you can avoid adding it to checked-in files in a Git repository. |
AXE_REPORTS_URL | (Optional) Specifies the URL where the results will be uploaded. Usually is the address of the axe Reports server. |
Obtaining an API Key
To obtain an API key, contact your Deque representative directly, reach us via our support desk, or send us an email. We'll be happy to help.
Generating Results
There are several ways to generate results for upload to axe Reports. This section contains links to sample code showing how to generate accessibility results.
For Node.js and JavaScript examples, see Code Samples for the @axe-devtools/reporter Package
For other languages, see:
- For C#, see Generating Reports with C#.
- For Java, see Generating Reports with Java.
- For Python, see Generating Reports with Python.