Visual Studio "Failed tests if any were marked as flaky hence changing the exit code to 0" 后忽略的测试任务错误
Visual Studio Test task errors ignored after "Failed tests if any were marked as flaky hence changing the exit code to 0"
我有一个带有“Visual Studio 测试”任务的管道,其中“最小测试数”设置为 10:
但是,当发布不满足 10 次最低测试要求时,日志中会包含正确的错误:
2021-02-18T04:47:15.4609022Z ##[error]The specified minimum number of tests 10 were not executed in the test run.
然而,下面两行,我们有如下日志:
2021-02-18T04:47:16.2005970Z Execution Result Code 1 is non zero, checking for failed results
2021-02-18T04:47:17.8073253Z Failed tests if any were marked as flaky hence changing the exit code to 0
并且任务被标记为成功。 None 整个测试套件中的测试被标记为不稳定? 如果有任何标记为不稳定的失败测试,那么在哪里可以将退出代码更改为 0 日志来自?
Failed tests if any were marked as flaky hence changing the exit code to 0
您可以尝试在项目设置的测试管理中禁用Flaky test detection
。
不稳定的测试阻碍了发现真正的问题,因为失败通常与正在测试的更改无关。易碎测试是一种提供不同结果(例如通过或失败)的测试,即使源代码或执行环境没有变化。不稳定的测试也会影响交付代码的质量。
详情请参考这篇document。
我有一个带有“Visual Studio 测试”任务的管道,其中“最小测试数”设置为 10:
但是,当发布不满足 10 次最低测试要求时,日志中会包含正确的错误:
2021-02-18T04:47:15.4609022Z ##[error]The specified minimum number of tests 10 were not executed in the test run.
然而,下面两行,我们有如下日志:
2021-02-18T04:47:16.2005970Z Execution Result Code 1 is non zero, checking for failed results
2021-02-18T04:47:17.8073253Z Failed tests if any were marked as flaky hence changing the exit code to 0
并且任务被标记为成功。 None 整个测试套件中的测试被标记为不稳定? 如果有任何标记为不稳定的失败测试,那么在哪里可以将退出代码更改为 0 日志来自?
Failed tests if any were marked as flaky hence changing the exit code to 0
您可以尝试在项目设置的测试管理中禁用Flaky test detection
。
不稳定的测试阻碍了发现真正的问题,因为失败通常与正在测试的更改无关。易碎测试是一种提供不同结果(例如通过或失败)的测试,即使源代码或执行环境没有变化。不稳定的测试也会影响交付代码的质量。
详情请参考这篇document。