Recently, with the continuous integration of Jenkins ant JUnit-based testing, separate ant JUnit-generated junitreport reports are turned on normally, and the HTML Publisher Plugin plugin using Jenkins does not display the report content properly. There are only three frame placeholder boxes, as shown in
This is due to some of Jenkins security settings caused by the display of the problem, click F12, you can see the following error
Solutions
Method One: Login to the Jenkins system, click "System Management"----"script command line", execute the following command, re-refresh the Junitreport log page to see the entire content
System.setproperty (default-src ' self ';
Method Two:
Method one is only temporary modification, if you want to restart after the still valid, you can specify the startup parameters at startup
java-dhudson.model.directorybrowsersupport.csp=-jar Jenkins.war
The above is started directly through the war package, if Jenkins is launched through the Tomcat container, you can set parameters to execute, vi/etc/profile
Add a row of export java_opts= "-Dhudson.model.DirectoryBrowserSupport.CSP=\" sandbox; default-src ' self ';
Resources
Https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin
Https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy
The HTML Publisher Plugin plugin installed by Jenkins does not show the ant-generated Junitreport report