Gatling Reports are not shown on Jenkins


I have my project built on maven and configured to run some scenarios and display test results through Gatling plugin in pom.


When I run the build, Jenkins does not show the Gatling reports but the files can be download and the graphs and plots in that report(and just launch the .html locally) are visible.

We tried all the possible combination of parameters(default-src, self-style, etc) to keep them ‘self’ but it didnt work. Below are some of the commands we tried and tested(checked if reports are shown)

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'self';")
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'none'; img-src 'self'; style-src 'self' 'unsafe-inline';")

and the error on our browser console :

Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('.......'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

We never had to use the Gatling plugin on Jenkins before. Setting it through maven build used to work and reports were generated and shown on Jenkins until July 2022. But since then, we are not able to see the reports on Jenkins.

Let us know the root-cause of this configurational challenge(setting system property/customising Content Security Policy not working) and how to fix it?


It’s not possible. In short, Jenkins has blocked the possibility to serve content from the filesystem.
This feature is dead, nothing we can do about it.