5

My jenkins version is 1.608 and JUnit plugin is 1.2beta 4. When I run the test locally I can see that the reports are correctly generated but when I run the build it fails [also I dont see the reports in the folder]. The folder structure looks like workspace/java/src/proj/test/test1/*.xml. Not sure what the problem is. This was fine until last week. The jenkins configurations also gives shows an error in the Publish Junit test report section ‘src\proj\test\test1\report.xml’ doesn’t match anything: ‘src’ exists but not ‘src\proj\test\test1\report.xml’

Error-

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)
8785krs
  • 101
  • 1
  • 1
  • 9
  • You need to add more information. Buildsystem, verbose build log, jenkins configuration. – arved Sep 15 '15 at 07:55
  • How do you run tests? Using Ant? Then how do you define target folder for reports? Something like that: http://stackoverflow.com/questions/5994790/ant-and-junit-no-xml-report-being-generated ? – rsutormin Sep 15 '15 at 09:56
  • So these are intern tests and they run as a separate project on a separate jenkins (slave) machine. – 8785krs Sep 15 '15 at 13:35
  • This is my Test Report XMLs Path: **/abc/test/target/surefire-reports/*.xml This is my local path /Users/ddigges/dev/abc/trunk/src/qbo/test/target/surefire-reports Also, Jenkins version: Jenkins ver. 1.609.1.1 (CloudBees Jenkins Enterprise 15.05) – deborah-digges Nov 03 '15 at 10:20
  • Based on your local path ` /Users/ddigges/...` I guess Jenkins is running on a Linux host. The error messages states a build step `Execute Windows batch command`. Do you try to run a Windows batch script on a Linux machine? – SubOptimal Nov 04 '15 at 08:15
  • @deborah-digges @SubOptimal `/Users/ddigges` is likely OS X – Whymarrh Nov 04 '15 at 16:00
  • This is the exact message I'm getting: Recording test results 01:22:01 ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception 01:22:01 hudson.AbortException: No test report files were found. Configuration error? – deborah-digges Nov 05 '15 at 09:38
  • So, are you using windows as jenkins node? If so, put either double backslash in configuration, or simple slash, to comply all systems. – Stan E Nov 05 '15 at 14:18

1 Answers1

3

I'm not sure if it will help you but this worked fine for me when I encountered the same issue:

No test report files were found in Hudson with NUnit

What you need to do to fix this: Place the *.xml-folder in the workspace-folder of Hudson and modify "Publish NUnit test result report" in a way that only the name of your *.xml-folder is given, not the absolute path.

Community
  • 1
  • 1
Seth
  • 1,545
  • 1
  • 16
  • 30