Configuration Files SortSite Developer Manual
The command line tool takes one parameter, the name of an XML configuration file describing the site to scan:
SortSiteCmd Test.ssconfig
The XML configuration file contains the URL of the site to scan, where to save the report and looks like this:
<Site>
<!-- scan this URL -->
<ProcessURL>https://www.example.com/</ProcessURL>
<!-- and these additional URLs as part of the same site -->
<ProcessURL>https://www.example.com/landing-page1</ProcessURL>
<ProcessURL>https://www.example.com/landing-page2</ProcessURL>
<!-- scope options are scopePage, scopePageAndLinks, scopeFolder or scopeSite -->
<Scope>scopeSite</Scope>
<!-- set to false to ignore robots.txt (NB only do this for sites you control) -->
<UseRobotsTxt>true</UseRobotsTxt>
<!-- using these SortSite exported rule settings (optional) -->
<SettingsFile>/Projects/Test.sset</SettingsFile>
<!-- save results in this directory - must have a trailing slash, and must start with a drive letter on Windows -->
<ReportOutputPath>/Projects/TestOutput/</ReportOutputPath>
<!-- return a non-zero error code from SortSiteCmd.exe if actual issues found don't match these counts -->
<!-- use this in automated builds or CI tools to flag an error when tests fail -->
<ExpectedResults>
<class name="ALL" expected="0" /> <!-- expected total issue count -->
<class name="ERR" expected="0" /> <!-- expected issue count on Errors tab -->
<class name="ACC" expected="0" /> <!-- expected issue count on Accessibility tab -->
<class name="BUG" expected="0" /> <!-- expected issue count on Compatibility tab -->
<class name="SEO" expected="0" /> <!-- expected issue count on Search tab -->
<class name="USE" expected="0" /> <!-- expected issue count on Usability tab -->
<class name="W3C" expected="0" /> <!-- expected issue count on Standards tab -->
</ExpectedResults>
</Site>
The following table lists the elements used in the configuration file. The configuration file determines what to scan, and where to save the results. If you need to change the scan options used, then the settings file described below.
Element | Description |
---|---|
Site |
Root element |
ProcessURL |
The URL to start the scan from. For example https://www.example.com/ or file:///C:/Projects/example.html .
Add additional ProcessURL elements to specify unlinked pages (e.g. landing pages) that should
be included in the same scan. URLs must be entity encoded so https://www.example.com/?param1=one¶m2=two should
appear in the config file as https://www.example.com/?param1=one&param2=two
|
Scope |
Describes what parts of the site to scan - corresponds to the scan type in the desktop application:
|
UseRobotsTxt |
Ignores robots.txt file if set to false. Note - only do this for sites you control or have written permission from the site operator. |
ReportOutputPath |
Results are saved to this folder. The report consists of multiple files: an HTML version in the "report" sub-directory
as well as RTF and CSV versions of the report all saved to ReportOutputPath .
|
SettingsFile (optional) |
An optional XML settings file containing SortSite rule settings: whether to scan for broken links, level of WCAG checked, etc. Create this file by choosing Export Settings on the File menu of the desktop application. |
ReplayFile (optional) |
An optional XML replay file containing Recorded Form input. Create this file by choosing Export from the desktop application, then export this file by selecting the Recorded Forms option. Exported form replays are encrypted with a machine specific encryption key, so must be exported and used on the same machine running SortSiteCmd. |
LogLevel (optional) |
Enables logging - the log is saved in ReportOutputPath with a .log extension.
|
ExpectedResults (optional) |
If the scan succeeded, but the total number of issues found doesn't match the expected ALL count then a non-zero exit code
is returned by SortSiteCmd.exe . If this section is omitted and the scan starts successfully, then a zero exit code is returned (even if some issues were found).
|