根据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
不幸的是,我收到以下错误:
错误,失败和警告
1)无效:C:\ Projects \ DataService.IntegrationTests \ bin \ Debug \ DataService.IntegrationTests.dll 在'C:\ Projects \ DataService.IntegrationTests \ bin \ Debug.DataService.IntegrationTests.dll'中找不到合适的测试。 任何一个程序集都不包含任何测试或未找到正确的测试驱动程序。
此程序集中提供了.feature
文件...
这可能是什么问题?
我的假设是,我们正在使用Specflow.MsTest
...
有没有办法使用TestResult.xml
生成MsTest
?
提前致谢
答案 0 :(得分:1)
NUnit3-console只能运行NUnit测试。 (从技术上讲,它可以运行任何提供驱动程序的测试,但它也是相同的。)
如果要创建NUnit输出,请同时使用NUnit框架和NUnit控制台运行器。 MsTest没有NUnit输出。
答案 1 :(得分:0)
在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>