1
votes

I am setting up an Android project from git in Jenkins, I am getting below error :

Recording test results ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error? Finished: FAILURE

My project have 59 testcases i want to get the test report execution result to be created when Jenkins job is executed.

I have set up the publish JUnit test result report in the POST Build Actions.

2
We need to have more information to help you. How your jenkins is configured ? If you have any jenkinsfile, please edit your post and paste itXero
Also, if you check in the output of the Jenkins build, is there results from running the test cases? I.e. are the test cases running and Jenkins not finding them or are they not even running? Either way, yes a configuration error, but without more details including the configuration, we can't help you.Stephen M -on strike-

2 Answers

1
votes

Depending on your build tool, there is a certain path were your unit tests should be located to generate test reports.

For a Gradle Java project as an example, all tests need to be located under src/test/java/...

Otherwise Gradle wont create an testreport.xml and jenkins is not able to pick up the results.

Also look here, topic was already covered: Jenkins JUnit Test Result Report plugin states that the JUnit xml file is not found?

0
votes

The above error is generally occurs when the Jenkins unable to find the XML files from the work-space.Need to define the exact location where the xml file is getting created. For eg. Route this way in my environtment Go to Jenkins Route to the project where you are triggering the build. Check for workspace Click on Target Click on Test-results Click on Test_run Here my XML files are available so the same location will defined in my Add Junit Configuration. For eg. **/target/test-results/run_tests/*.xml

Thanks