0

尝试在 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>

4

0 回答 0