Specflow TestExecution.json 输出不包括并行运行时运行的所有测试

时间:2021-04-14 16:37:58

标签: c# specflow specrun

尝试在 Docker 机器上使用 Specflow+ Runner 并行运行测试。控制台说所有测试都运行了,但 TestExecution.json 和生成的 LivingDoc 只包含一小部分的测试结果,其余部分被跳过。不知道报告为什么要这样做。

根目录下的Default.srprofile:

<?xml version="1.0" encoding="utf-8"?>
<TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5">
  <Settings projectName="TestHarness" />
  <Execution retryFor="None" stopAfterFailures="0" testThreadCount="3" testSchedulingMode="Random" apartmentState="MTA"/>
  <!-- For collecting by a SpecRun server update and enable the following element. For using the 
      collected statistics, set testSchedulingMode="Adaptive" attribute on the <Execution> element.
    <Server serverUrl="http://specrunserver:6365" publishResults="true" />
  -->
  <TestAssemblyPaths>
    <TestAssemblyPath>TestHarness.dll</TestAssemblyPath>
  </TestAssemblyPaths>
  <Report disable="true" />
  <DeploymentTransformation>
    <Steps>
      <!-- sample config transform to change the connection string-->
      <!--<ConfigFileTransformation configFile="App.config">
        <Transformation>
          <![CDATA[<?xml version="1.0" encoding="utf-8"?>
                            <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
                <connectionStrings>
                  <add name="MyDatabase" connectionString="Data Source=.;Initial Catalog=MyDatabaseForTesting;Integrated Security=True" 
                       xdt:Locator="Match(name)" xdt:Transform="SetAttributes(connectionString)" />
                </connectionStrings>
                            </configuration>
                        ]]>
        </Transformation>
      </ConfigFileTransformation>-->
    </Steps>
  </DeploymentTransformation>
</TestProfile>

0 个答案:

没有答案
相关问题