3
我正在使用这个nant任务进行我的nunit测试。使用TestNase属性从nant运行nunit测试
<nunit2 failonerror="false">
<formatter usefile="true"
outputdir="build"
type="Xml"
extension=".xml"/>
<test>
<assemblies>
<include name="Build/*.Tests.dll"/>
</assemblies>
<references >
<include name="Tools/**/*.dll"/>
<include name="Build/*.dll"/>
</references>
</test>
</nunit2>
它有很好的好处,我可以在不改变任何东西的情况下在多个项目中使用它。问题是它似乎忽略了我的一些测试中的TestCase
和ExpectectException
属性,导致它们失败。我已经看到了使用exec
任务调用nunit-console.exe的建议,但我必须单独指定所有的测试dll。这意味着我无法在所有项目中使用它,而无需对其进行编辑。无论何时,我都可以在我的解决方案中添加测试项目时编辑它。
有没有什么办法让两全其美?
感谢。这正是我所期待的。 – scott