JUnit configuration

I can’t able to see the below configurations in Jenkins for Junit plugin. (I have installed JUnit plugin already)

Configure the JUnit plugin in Jenkins:

  • Go to the Jenkins dashboard.
  • Click on “Manage Jenkins” and select “Configure System.”
  • Scroll down to the “Publish JUnit test result report” section.
  • Click on “Add” to add a new configuration.
  • In the “Test report XMLs” field, enter the path to your JUnit XML files. For example, if your JUnit XML files are located in the “target/surefire-reports” directory, you can use the pattern “**/target/surefire-reports/*.xml”.
  • Save the configuration.

I am using latest version of Jenkins LTS.

The JUnit report configuration is done inside the definition of the Pipeline that you are creating. The Jenkins Maven tutorial will guide you through that experience step by step

See this video for another example:

If you would rather use a freestyle job than use a Pipeline job, then you need to change the choices you described. You said:

Change that last item to open the Jenkins job and add a post build action to publish JUnit reports. JUnit report publishing is defined inside each job, not as a configuration for the entire system.

1 Like

Thanks Mark. Mine is Pipeline job, i will go through the video.