Batch Processing of Spec Files
Process multiple spec files in batches
For users with multiple spec files, the option exists to process them all with a single command instead of individually. This saves time and energy, allowing any number of spec files to run without constant user action.
Spec file batch processing requires a specific structure of inputs to allow it to access and run multiple spec files. All spec files you desire to scan must be contained in a single directory (and its sub-directories). This single directory is a required parameter for the run. The CLI will traverse any sub-directories to find additional spec files within, regardless of their structure.
The base command for running the axe DevTools CLI in bulk spec mode is as follows:
axe bulk-spec <spec-files-directory> <output-directory>
bulk-spec initiates bulk mode,
<spec-files-directory> is a required parameter and the path to the directory containing the spec files, and
<output-directory> is an optional parameter and the path to the desired output directory. If no output directory is specified the results will be output to the current working directory
While running, bulk run process updates will be listed to
STDOUT. To disable these alerts, use the dismiss alerts flag.
Once the run has completed, the results can be found in the
<output-directory> if one has been specified, or the current working directory if an output directory was not specified. For every
analyze action in the bulk spec run, there will be one results object containing the results of that scan. Additionally, there will be a logfile containing information on which spec files failed as well as any information available as to why that spec file failed.