即使某个特定NUnit测试失败,MSBuild也不应失败

即使某个特定NUnit测试失败,MSBuild也不应失败,msbuild,nunit,cruisecontrol.net,Msbuild,Nunit,Cruisecontrol.net,我集成了连续构建过程和巡航控制。在EOD时,它生成一个构建报告。如果任何NUnit测试用例失败,则构建失败。我们已经编写了一个特定的测试用例,并将其添加到一个单独的dll中。如果程序集中的任何测试用例失败,我们不希望构建失败。我们正在使用MSBuild target、.proj文件和cruise control、ccnet配置文件。我将调用NUnit两次:一次是针对您希望在生成不通过时失败的测试,然后第二次运行您不希望影响生成的测试,例如 <!-- Any failing tests in

我集成了连续构建过程和巡航控制。在EOD时,它生成一个构建报告。如果任何NUnit测试用例失败,则构建失败。我们已经编写了一个特定的测试用例,并将其添加到一个单独的dll中。如果程序集中的任何测试用例失败,我们不希望构建失败。我们正在使用MSBuild target、.proj文件和cruise control、ccnet配置文件。

我将调用NUnit两次:一次是针对您希望在生成不通过时失败的测试,然后第二次运行您不希望影响生成的测试,例如

<!-- Any failing tests in Assembly1.dll will cause the build to fail. -->
<Exec Command="nunit.exe Assembly1.dll" />

<!-- Any failing tests in Assembly2.dll won't fail the build because the ContinueOnError attribute is set to True. -->
<Exec Command="nunit.exe Assembly2.dll" ContinueOnError="True" />

我会调用NUnit两次:一次是为了测试,如果测试不通过,你想让构建失败,然后第二次是为了运行测试,你不想影响构建,例如

<!-- Any failing tests in Assembly1.dll will cause the build to fail. -->
<Exec Command="nunit.exe Assembly1.dll" />

<!-- Any failing tests in Assembly2.dll won't fail the build because the ContinueOnError attribute is set to True. -->
<Exec Command="nunit.exe Assembly2.dll" ContinueOnError="True" />


如果任何测试失败,则通过将ContinueOnError设置为true,将执行该程序集中的其余测试。但是构建仍然失败,因为我的测试失败了。因此ContinueInError=true不起作用如果任何测试失败,则通过将ContinueOnError设置为true,将执行该程序集中的其余测试。但是构建仍然失败,因为我的测试失败了。因此ContinueInError=true不起作用