Newman: “htmlextra” reporter not displaying correctly when viewed from Jenkins

Hi,

I am using “htmlextra” to generate a nice report and when I open the html directly it displays correctly.

I have configured Jenkins to use a “Publish HTML Reports” post build action but the display is non-colored and not as nice. I can save the archive locally and open it directly but it would be nice if I could get it to display correctly from Jenkins. It is also displaying at the Job level rather than the build level which is not ideal either.

Has anyone else come across this? Am I using the correct plug-in in Jenkins or is there another plugin?

Thanks in advance!

Hey @mrpatton7,

Welcome to the community :wave:

Thank you for using the reporter!! :trophy:

This is something that might help you out here:

https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy

It’s all down to the way Jenkins is set up by default - I’ve been messing about with this locally and could see the before and after results.

Run this in the Script Console to see the change.

System.setProperty( "hudson.model.DirectoryBrowserSupport.CSP" , "" )

This has multiple security implications so be aware of what you’re doing when unsetting headers like this one.

I was running Jenkins locally so I was in control of the whole set up.

2 Likes

Hey @dannydainton,

It’s so exciting to get a reply from the creator of the reporter :trophy:
Thanks so much for taking the time to look into my problem and get back to me so promptly.
I will look into this tomorrow and let you know how it goes.
Kind regards,
Martin

3 Likes