【发布时间】:2015-12-10 22:59:25
【问题描述】:
我的 jenkins 版本是 1.608,JUnit 插件是 1.2beta 4。当我在本地运行测试时,我可以看到报告已正确生成,但是当我运行构建时它失败了 [我也没有在文件夹中看到报告] .
文件夹结构看起来像workspace/java/src/proj/test/test1/*.xml.
不确定是什么问题。直到上周还好。 jenkins 配置还在 Publish Junit 测试报告部分显示错误‘src\proj\test\test1\report.xml’ doesn’t match anything: ‘src’ exists but not ‘src\proj\test\test1\report.xml’
错误-
Build step 'Execute Windows batch command' marked build as failure
Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:116)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:92)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:325)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at hudson.remoting.Engine$1$1.run(Engine.java:69)
at java.lang.Thread.run(Thread.java:798)
at ......remote call to tm1w08perf11-5000(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:753)
at hudson.FilePath.act(FilePath.java:978)
at hudson.FilePath.act(FilePath.java:967)
at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:89)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:121)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:138)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
【问题讨论】:
-
您需要添加更多信息。构建系统、详细构建日志、詹金斯配置。
-
你如何运行测试?使用蚂蚁?那么如何定义报表的目标文件夹呢?类似的东西:stackoverflow.com/questions/5994790/… ?
-
所以这些是实习生测试,它们在单独的 jenkins(从)机器上作为单独的项目运行。
-
这是我的测试报告 XMLs 路径:*/abc/test/target/surefire-reports/.xml 这是我的本地路径 /Users/ddigges/dev/abc /trunk/src/qbo/test/target/surefire-reports 另外,Jenkins 版本:Jenkins 版本。 1.609.1.1(CloudBees Jenkins 企业版 15.05)
-
基于你的本地路径 ` /Users/ddigges/...` 我猜 Jenkins 正在 Linux 主机上运行。错误消息说明了构建步骤
Execute Windows batch command。您是否尝试在 Linux 机器上运行 Windows 批处理脚本?