生成的TestResult与NUnit控制台失败
问题描述:
按照SpecFlow网站,我可以生成通过执行以下语句的TestResult:生成的TestResult与NUnit控制台失败
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
...
有没有办法通过使用MsTest
生成TestResult.xml
?
在此先感谢
答
NUnit3-console只能运行NUnit测试。 (从技术上讲,它可以运行任何测试,但是它可以运行相同的测试。)
如果要创建NUnit输出,请同时使用NUnit框架和NUnit控制台运行器。 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>
你有什么在你的app.config配置为您的unitTestProvider? –
我配置了MSTest – xeraphim
好的,但是为什么您通过NUnit执行测试?您必须为MsTest使用vstest.console.exe。 –