Scoverage reports

151 views
Skip to first unread message

Gastón Tonietti

unread,
Jan 17, 2017, 7:39:03 PM1/17/17
to Jenkins Users
Hi everyone,

I'm having some problems trying to publish scoverage reports on Jenkins. I'm using Pipelines configured by a Jenkinsfile.
I tried with publishHTML, the report seems to be there in the build but when I open it only a couple of blank frames are shown.
Then searching I found there is a specific Jenking plugin for Scoverage, I installed it but I can't find any entry for it in the snippets generator, so I tried a couple of random syntaxes without any luck :)

What is the proper way of publishing a scoverage report from a Jenkinsfile?

Thank you all,
Gaston.

Daniel Beck

unread,
Jan 18, 2017, 8:16:11 AM1/18/17
to jenkins...@googlegroups.com

> On 18.01.2017, at 01:39, Gastón Tonietti <gaston....@gmail.com> wrote:
>
> I tried with publishHTML, the report seems to be there in the build but when I open it only a couple of blank frames are shown.

Check your browser's error console. Maybe this is SECURITY-95?

https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

Gastón Tonietti

unread,
Jan 18, 2017, 6:12:50 PM1/18/17
to Jenkins Users, m...@beckweb.net
Hi Daniel,

Indeed I have plenty of security errors on the console when trying to load the html report.
But TBH I'd be more interested in setting up the scoverage plugin as it generates a trend graph too.

Are you aware of the syntax I should use in my Jenkinsfile to enable it?

Thank you!
Gaston.

nvio...@atypon.com

unread,
Aug 29, 2017, 4:07:43 AM8/29/17
to Jenkins Users, m...@beckweb.net
Hi Gaston,

Any luck with this? I am facing the same problem.

Thank you.

nvio...@atypon.com

unread,
Aug 29, 2017, 11:09:23 AM8/29/17
to Jenkins Users, m...@beckweb.net
Solved by using the following step definition on the respective step:

step([$class: 'ScoveragePublisher', reportDir: 'target', reportFile: 'scoverage.xml'])

Also, in scoverage maven configuration, i have set the following:

<plugin>
    <groupId>org.scoverage</groupId>
    <artifactId>scoverage-maven-plugin</artifactId>
    <version>${scoverage.plugin.version}</version>
    <configuration>
        <scalaVersion>${scala-library.version}</scalaVersion>
        <aggregate>true</aggregate>        
        <outputDirectory>${project.build.directory}/Scoverage_Report/</outputDirectory>
    </configuration>    
</plugin>

Chaitanya Reddy

unread,
Jun 10, 2019, 1:51:29 PM6/10/19
to Jenkins Users
Hi,

Was this a multi module project. 
Reply all
Reply to author
Forward
0 new messages