Go to Blog: Shanghai-leisurely
Objective
To display the HTML report on Jenkins, you need to add an HTML Publisher plugin plugin to put the generated HTML report into the specified folder so that you can use Jenkins to read the report for the specified folder.
First, post-construction operations
1. After executing the test case, you can read the HTML report file using the "add post-Build Action step"
2. If you have publish THML reports this option can be added directly, do not see the next step.
Second, add HTML Publisher plugin plugin
1. Open System Management-manage plugins
2. Select the "Optional plugins" screen
3. In the top right corner, search for plugins that need to be installed:HTML Publisher plugin
4. After the check is installed directly, after installation can restart Jenkins, and then go back to the first step of the operation will be able to see this option.
Third, add reports
1. After opening the reports, the interface is displayed as follows
2.HTML directory to archive: Here is the test report path generated after running the script on this computer, and here is the relative path.
If the previous code is automatically pulled with Git, then the workspace find the path to generate the report, where the project name Yoyo_git can be omitted, relative path to fill Yoyo_ketang/report
3. Report Name: Index.html, this is the run after the script, the report folder under the name of generating reports, their own random name, to ensure that the names of the file folder with the same line
(Generate a fixed name each time, new overwrite old, do not add time stamp)
4. The name displayed on Jenkins, the default HTML report is OK
5. Click Apply
Iv. Presentation of the report
1. After running, an HTML report directory will be generated on the left side of the project
2. Click to view Details
3. After the point is opened, the normal situation should be the same as the local HTML browser open.
The HTML format is missing because Jenkins does not load the CSS style by default and needs to be set.
To know how to solve, and listen to the next explanation!
Display HTML Report "reprint" on Jenkins