1

I'm using Scoverage for coverage reporting on a scala project. The XML report is generated properly but the HTML version looks blank like this

enter image description here

I'm using scalatest version "3.1.1" and latest coverage plugin version

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

This problem seems to be around for a long time with the Jenkins plugin, see issue but without any recent activity/fix.

What would be an alternative option? is switching to JaCoCo would help?

bachr
  • 5,780
  • 12
  • 57
  • 92
  • 1
    Try to look at the Javascript console when you load that page, I guess there will be some errors reported, likely related to the CSP. If that is the case, look here: https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy – cbley Mar 30 '20 at 13:28
  • 1
    I just realized that this is exactly what the bug report you referenced already told you. So, yes, this is very likely the problem and if you want to see those pages you have to configure the content security policy to let the browser access the files of the scoverage report. – cbley Mar 30 '20 at 13:31
  • OK so the only way to get this fixed is on Jenkins side, thanks for the link I will try it. – bachr Mar 30 '20 at 18:49
  • @bachr Any luck with this? – mdabdullah Jan 29 '21 at 13:35
  • 1
    @mdabdullah no main issue not resolved, i did put as answer a workaround I'm currently using. – bachr Jan 29 '21 at 22:32

1 Answers1

0

Main issue still not resolved, I'm currently using this plugin in Chrome Content Security Policy Override with a config like this

# Whitelisting jenkins SCoverage Report:
[
  ["https://jenkins\\.mydomain\\.com", [
    [".*", ""]
  ]]
]
bachr
  • 5,780
  • 12
  • 57
  • 92