jenkins junit插件提示Test reports were found but none of them are new. Did leafNodes run?

问题场景:我本地编译后将内容放到jenkins的工作空间,去指定xml执行junit插件命令。抛出Test reports were found but none of them are new. Did leafNodes run?错误。

错误原因:

There is a timestamp check but looks like it works on file timestamps (last modified) and uses a jitter of 3000 (presumably milliseconds). The JUnit plugin is ignoring test XML output that is older than the buildtime of the current build minus 3 seconds. If the test run and the JUnit plugin run are more than 3 seconds apart, the plugin will ignore the files.

解决方案:

确保.xml文件是最新的就行,junit插件执行前加个对xml文件的修改。sh "touch *.xml"

猜你喜欢

转载自blog.csdn.net/a910196454/article/details/106992778