使用 nunit-console 失败生成 TestResult

Generating TestResult with nunit-console failing

根据SpecFlow网站,我可以通过执行以下语句生成TestResult:

nunit3-console.exe --labels=All --out=TestResult.txt "--result=TestResult.xml;format=nunit2" bin\Debug\BookShop.AcceptanceTests.dll

我已将此声明改编为以下内容:

nunit3-console.exe --labels=All --out=C:\temp\TestResult.txt "--result=C:\temp\TestResult.xml;format=nunit2" C:\Projects\DataService.IntegrationTests\bin\Debug\DataService.IntegrationTests.dll

不幸的是,我收到以下错误:

Errors, Failures and Warnings

1) Invalid : C:\Projects\DataService.IntegrationTests\bin\Debug\DataService.IntegrationTests.dll No suitable tests found in 'C:\Projects\DataService.IntegrationTests\bin\Debug.DataService.IntegrationTests.dll'. Either assembly contains no tests or proper test driver has not been found.

.feature 文件在此程序集中可用...

这可能是什么问题?

我的一个假设是,我们正在使用 Specflow.MsTest...
有没有办法使用 MsTest 生成 TestResult.xml

提前致谢

NUnit3-console 只能 运行 NUnit 测试。 (从技术上讲,它可以 运行 提供驱动程序的任何测试,但它们是一样的。)

如果要创建 NUnit 输出,请同时使用 NUnit 框架和 NUnit 控制台 运行ner。 MsTest 不执行 NUnit 输出。

在 app.condig 我没有任何 unitTestProvider

  <specFlow>
    <stepAssemblies>
      <stepAssembly assembly="otherProject" />
    </stepAssemblies>
    <runtime detectAmbiguousMatches="true" stopAtFirstError="false" missingOrPendingStepsOutcome="Inconclusive" />
    <trace traceSuccessfulSteps="true" traceTimings="false" minTracedDuration="0:0:0.1" />
    <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
  </specFlow>