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>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>		

	<!-- 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 -->
	<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.

ElementDescription
SiteRoot element
ProcessURLThe URL to start the scan from. For example http://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 http://www.example.com/?param1=one&param2=two should appear in the config file as http://www.example.com/?param1=one&amp;param2=two
ScopeDescribes what parts of the site to scan - corresponds to the scan type in the desktop application:
  • Use scopeSite to run a "Check Site" scan
  • Use scopeFolder to run a "Check Folder" scan
  • Use scopePage to run a "Check Page" scan
  • Use scopePageAndLinks to run a "Check Page and Links" scan
UseRobotsTxtIgnores robots.txt file if set to false. Note - only do this for sites you control or have written permission from the site operator.
ReportOutputPathResults 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.
  • 0 - disabled
  • 1 - minimal logging
  • 2 - full logging
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).