The question may sound silly, but I haven't found how to configure the XML report path in the Post-build Junit task after an hour of manipulations. I generate the JUnit test report (the XML file) here :
C:\Program Files\Jenkins\jobs\UPWSP\workspace\up\UPWSP\current\06-Java Unit Testing\junit\TESTS-TestSuites.xml
And the job using the XML has its worskpace at this path :
C:\Program Files\Jenkins\jobs\UPWSP - Tests JUnit\workspace\
The JUnit report post-build task seems to take only relatives path and I already tried with
../../UPWSP/up/UPWSP/current/06-Java Unit Testing/junit/TESTS-TestSuites.xml
**../../UPWSP/up/UPWSP/current/06-Java Unit Testing/junit/TESTS-TestSuites.xml
It always tells me '..' is not a valid path, and an absolute path won't work either. Any idea of how I should use it?
Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language. It is used to implement CI/CD workflows, called pipelines.
Jenkins is a platform for creating a Continuous Integration/Continuous Delivery (CI/CD) environment. The system offers many different tools, languages, and automation tasks to aid in pipeline creation when developing and deploying programs.
Jenkins creates workflows using Declarative Pipelines, which are similar to GitHub Actions workflow files. Jenkins uses stages to run a collection of steps, while GitHub Actions uses jobs to group one or more steps or individual commands. Jenkins and GitHub Actions support container-based builds.
A maven is a build tool designed to manage dependencies and the software lifecycle. It is also designed to work with plugins that allow users to add other tasks to the standard compile, test, package, install, deploy tasks. Jenkins is designed for the purpose of implementing Continuous Integration (CI).
AFAIK, the path for the JUnit XML file has to be a sub-directory of your project. It should not be outside the job's workspace. Once you have created a directory inside workspace, say for example, junit-test, then the following should work as expected when specified in Test report XMLs
section: junit-test\TESTS-TestSuites.xml
You can use wildcards like **/target/surefire-reports/*.xml
or, in your case, **/junit/*.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With