Publish JUnit Test Reports in Jenkins, for a Maven Project



The project has to be configured as "freestyle", not as "Maven" - otherwise some options won't show up.

  • open the project in Jenkins
  • click "Configure"
  • under "Build", click "Add build step"
    • choose "Invoke top-level Maven targets"
      • Maven version: select your Maven version
      • Goals: clean test
  • under "Post-build Actions", click "Add post-build action"
    • choose "Publish JUnit test result report"
      • Test report XMLs: **/target/surefire-reports/*.xml
  • save