Configuration Files SortSite Developer Manual
The command line tool takes one parameter, the name of an XML configuration file describing the site to scan:
The XML configuration file looks like this:
<Site> <!-- scan this URL --> <ProcessURL>http://www.example.com/</ProcessURL> <!-- and these additional URLs as part of the same site --> <ProcessURL>http://www.example.com/landing-page1</ProcessURL> <ProcessURL>http://www.example.com/landing-page2</ProcessURL> <!-- for this scope, options are scopePage, 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 --> <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="LEG" expected="0" /> <!-- expected issue count on Privacy 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.
|ProcessURL||The URL to start the scan from. For example http://www.example.com/ or file:///C:/Projects/example.htm. Additional ProcessURL elements allow you to specify unlinked pages (e.g. landing pages) that should be included in the same scan.|
|Scope||Describes what parts of the site to scan: scopeSite corresponds to the "Check Site" menu command in the desktop application; scopeFolder corresponds to the "Check Folder" command; scopePage corresponds to the "Check Page" command.|
|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 scan and rule settings in the desktop application, then export this file by:
|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).|