Jenkins - Reporting
In Jenkins, a report is a structured and graphical way where we can see the execution results or output of the test. Reports are also useful when we have to communicate the results with our team members or with other stakeholders. There are many plugins available for reporting in Jenkins. It is easy, convenient, and recommended.
In Jenkins, Test results are generated in the form of Graphical Reports. These reports are just not graphical but can produce the detail written reports. This written report can be in different formats, and we can manage it by specifying along with the build command.
In the Post-build action for any job, you can define the reports to be created. To do that, go to your job -> configure.
Scroll down and click on Post-build action button and select Publish JUnit test result report option.
On the Test reports XMLs section, enter the path of the file.
Click on Apply then Save button.
Now click on the Build Now to build the project again.
In the "Build history" section, select the build and open up the build results.
Click on Test Result.
When you click on Test Result option, then you can see the test results which are simple, beautiful, and easy to understand.
As you can see, the below report is so much understandable than the XML code.
Here, you can see the number of passed tests and the number of failed tests. If your test fails, it will be displayed in red color.