gpt4 book ai didi

java - 由于未找到 Junit 测试报告,Jenkins 构建失败 : Intern Framework

转载 作者:搜寻专家 更新时间:2023-11-01 03:02:23 25 4
gpt4 key购买 nike

我的 jenkins 版本是 1.608,JUnit 插件是 1.2beta 4。当我在本地运行测试时,我可以看到报告已正确生成,但是当我运行构建时,它失败了 [我也没有在文件夹中看到报告] .文件夹结构类似于 workspace/java/src/proj/test/test1/*.xml。
不确定是什么问题。直到上周这都很好。 jenkins 配置还给出了在发布 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)

最佳答案

我不确定它是否对您有帮助,但是当我遇到同样的问题时,这对我来说效果很好:

No test report files were found in Hudson with NUnit

您需要做些什么来解决这个问题:将 *.xml 文件夹放在 Hudson 的工作区文件夹中,然后修改“Publish NUnit test result report”,使其只有您的 *.xml 文件夹的名称是给定的,不是绝对路径。

关于java - 由于未找到 Junit 测试报告,Jenkins 构建失败 : Intern Framework,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32573325/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com