Forum Discussion

ehubbard's avatar
ehubbard
Visitor
3 years ago

Jenkins Integraion with Zephyr Scale - File Not Found

We started using Zephyr last year for manual testing.  I'm now looking into the benefits on the automation side.  Trying out Zephyr Scale Jenkins plugin.  I'm running unit test and want to report it to Zephyr.  No matter what path I use I keep getting the following error:

[Zephyr Scale] [INFO] Publishing test results...
[Zephyr Scale] [ERROR] There was an error while publishing test results to Zephyr Scale and they were not sent. Error details: 
ERROR: Build step failed with exception
java.io.FileNotFoundException: File not found: junit.xml
	at com.adaptavist.tm4j.jenkins.io.FileReader.findFiles(FileReader.java:65)
	at com.adaptavist.tm4j.jenkins.io.FileReader.getZip(FileReader.java:26)
	at com.adaptavist.tm4j.jenkins.http.Tm4jJiraRestClient.uploadJUnitXmlResultFile(Tm4jJiraRestClient.java:77)
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.uploadResultsFile(TestResultPublisher.java:140)
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.validateFieldsAndUploadResults(TestResultPublisher.java:115)
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.publishResults(TestResultPublisher.java:94)
Caused: java.lang.RuntimeException
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.handlePublishException(TestResultPublisher.java:106)
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.publishResults(TestResultPublisher.java:96)
	at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(TestResultPublisher.java:85)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:21)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:808)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
	at hudson.model.Build$BuildExecution.post2(Build.java:179)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:701)
	at hudson.model.Run.execute(Run.java:1914)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:100)
	at hudson.model.Executor.run(Executor.java:433)
Build step 'Zephyr Scale: Publish Test Results' marked build as failure

I confirmed the file does exist in the root directory of my application.

 

I also noticed every time I go into the configuration the file path reverts back to the default:

Thoughts?

2 Replies

  • KonstantinosLps's avatar
    KonstantinosLps
    Occasional Contributor

    Hi,

    in order to make it work, you have to set the exact xml file location, not just the folder. It seems that if you just set the root report folder, the plugin does not know where to find the TEST*.xml files. So you can use something like below, depending on you reports structure:

     

    \junitreports\TEST*.xml
    
    or
    \junitreports\*\*\TEST*.xml

     

     

    That worked for me.

  • gamboashc's avatar
    gamboashc
    New Contributor

    Hi, I'm facing exactly the same issue! Did you find out how to fix it?