在我的自由式 Jenkins 作业中,我正在通过“执行 Windows 批处理命令”步骤执行单元测试:
call "C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" MyAssembly.dll
call SomeOtherProcess
由于有测试失败,我预计构建也会失败。然而,NUnit 的测试发布步骤将构建标记为不稳定:
Build step 'Publish NUnit test result report' changed build result to UNSTABLE
如果我SomeOtherProcess
从批处理脚本中删除 -line,一切正常,并且 nunit 产生的错误在构建过程中报告为错误。
我为 JUnit-test-reporter 阅读了类似的问题(即使测试失败,Jenkins JUnit 插件也会报告构建不稳定)。显然,记者甚至不支持构建失败。我不确定这是否也适用于 NUnit-reporter。