Jenkins Error: No test report files were found. Configuration error?

强颜欢笑 提交于 2020-01-05 05:35:08

问题


I can't figure out why I have this error. I've installed ant via jenkins on windows.

My project is called test-freestyle and is held at: C:\Program Files (x86)\Jenkins\workspace\test-freestyle

I've manually created an empty Reports folder inside that test-freestyle folder and am trying to follow this tutorial and this StackOverflow post to troubleshoot.

Here is the folder structure, proof that jenkins sees the directory build failure image Is it becasue Program Files needs admin rights to create files?

My code is in the JUnitTest1 project. My test cases are in JUnitTest1UnitTests

build-project:
    [echo] JUnitTest1: C:\Users\----\Documents\workspace\JUnitTest1\build.xml

init:

build-project:
    [echo] JUnitTest1UnitTests: C:\Users\-----\Documents\workspace\JUnitTest1UnitTests\build.xml

build:

 BUILD SUCCESSFUL
 Total time: 0 seconds
 Recording test results
 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
 Finished: FAILURE

回答1:


Go to you job then click Configure, then open Advance option and look for "use custom workspace" set it as your need and adjust the postbuild action to use folders relatives to your "new" workspace path



来源:https://stackoverflow.com/questions/40060527/jenkins-error-no-test-report-files-were-found-configuration-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!