Skip to main content

Testing with the CLI

Pre-requisites

Visit the Getting Started page to learn how to setup the CLI in your project.

Scanning

A Website

Escaping the url

Wrapping the URL with single quotes is an easy way to avoid issues with the shell interpreting special characters.

npx aetest scan 'https://www.audioeye.com'

A Local Document

npx aetest scan < example_inputs/document.html

By default, the CLI will expect a document to be a complete HTML document. If you are scanning a component, you can use the -c flag to run in component mode.

Scan Output

::: START AudioEye SDK CLI :::

Scanning HTML from STDIN

Found 16 accessibility issues
htmlSkipToMain - count: 1
imgTextAlt - count: 6
linkImgTextAlt - count: 9

Full Test Results were output to /example/folder/testing-sdk-output.html

::: END AudioEye SDK CLI :::

Scanning Components

npx aetest scan < example_inputs/component.html -c

Option Flags for Scanning

  -c, --component                             Run in component mode (create a document and inject the HTML)
-p, --print-test-list Print the list of tests that will be run
-d, --debug Internal Use only (Don't build off of this!)
-f, --format <file_type> Define the file type of the output (html, json or csv) (default: "html")
-o, --output <filename> Define the file path for test results output, default is ./aetest_results.<file_type>
-s, --stdout Output full results to stdout as well as a file, this will replace the summary output normally shown on stdout
-t, --timeout <seconds> Set the timeout for DOM rendering in seconds, default is 5 (default: "5")
-v, --viewport-dimensions <width>x<height> Set the viewport dimensions for the browser (width and height separated by "x")
-m, --mobile Set the viewport to a mobile device. Customize dimensions with --viewport-dimensions (default is 390x844).
-h, --help display help for command

HTML Output

Once you've run a scan, the test results will be added to an HTML document at the file path specified in the output. Here is an example result:

Screenshot of an Accessibility Testing SDK CLI report highlighting issues found on an example webpage. A table provides detailed information on issue type, WCAG level, WCAG number, and additional details.