Подтвердить что ты не робот

Есть ли какая-либо документация .runsettings?

Я ищу документацию для файлов .runsettings, используемых в vstest. Есть ли xsd?

Я не могу найти много, за исключением нескольких файлов примеров в документации msdn.

4b9b3361

Ответ 1

Runsettings (VS2012) аналогичны наборам тестов (VS2010), где настройки тестов специфичны для тестов, написанных для MSTest. VS2012 поддерживает настройки для разных адаптеров. Таким образом, схема не является закрытой системой, поэтому XSD не будет исчерпывающим.

В этой статье MSDN перечислены некоторые детали высокого уровня (https://msdn.microsoft.com/en-us/library/jj635153.aspx) для элементов в файле runsettings.

Вот фрагмент этой статьи.

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