I'm looking for documentation for .runsettings files as used with vstest. Is there an xsd?
I can't seem to find much except for a few example files in the msdn documentation.
runsettings file is to customize code coverage analysis. Run settings files can be used to configure tests that are run from the command line, from the IDE, or in a build workflow using Azure Test Plans or Team Foundation Server (TFS). Run settings files are optional.
Add a run settings file to your solution. In Solution Explorer, on the shortcut menu of your solution, choose Add > New Item, and select XML File. Save the file with a name such as CodeCoverage. runsettings.
Starting in Visual Studio 2022 Update 2, you can enable faster code coverage test results by selecting Tools > Options > Environment > Preview Features, then selecting Code coverage experience improvements, and then restarting Visual Studio.
Runsettings (VS2012) are similar to testsettings (VS2010) where testsettings is specific to tests written for MSTest. VS2012 supports settings for different adapters. As such, the schema isn't a closed system so an XSD would not be comprehensive.
This MSDN article lists some high level details (https://msdn.microsoft.com/en-us/library/jj635153.aspx) for the elements in the runsettings file.
Here's a snippet from that article.
<?xml version="1.0" encoding="utf-8"?> <RunSettings> <!-- Configurations that affect the Test Framework --> <RunConfiguration> <MaxCpuCount>1</MaxCpuCount> <!-- Path relative to solution directory --> <ResultsDirectory>.\TestResults</ResultsDirectory> <!-- [x86] | x64 - You can also change it from menu Test, Test Settings, Default Processor Architecture --> <TargetPlatform>x86</TargetPlatform> <!-- Framework35 | [Framework40] | Framework45 --> <TargetFrameworkVersion>Framework40</TargetFrameworkVersion> <!-- Path to Test Adapters --> <TestAdaptersPaths>%SystemDrive%\Temp\foo;%SystemDrive%\Temp\bar</TestAdaptersPaths> </RunConfiguration> <!-- Configurations for data collectors --> <DataCollectionRunSettings> <DataCollectors> <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <Configuration> <CodeCoverage> <ModulePaths> <Exclude> <ModulePath>.*CPPUnitTestFramework.*</ModulePath> </Exclude> </ModulePaths> </CodeCoverage> </Configuration> </DataCollector> </DataCollectors> </DataCollectionRunSettings> <!-- Parameters used by tests at runtime --> <TestRunParameters> <Parameter name="webAppUrl" value="http://localhost" /> <Parameter name="webAppUserName" value="Admin" /> <Parameter name="webAppPassword" value="Password" /> </TestRunParameters> <!-- Adapter Specific sections --> <!-- MSTest adapter --> <MSTest> <MapInconclusiveToFailed>True</MapInconclusiveToFailed> <CaptureTraceOutput>false</CaptureTraceOutput> <DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete> <DeploymentEnabled>False</DeploymentEnabled> <AssemblyResolution> <Directory Path>"D:\myfolder\bin\" includeSubDirectories="false"/> </AssemblyResolution> </MSTest> </RunSettings>
I found further information on runsettings (specific to code coverage) here:
http://msdn.microsoft.com/en-us/library/jj159530%28v=vs.110%29.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With