scoverage is a code coverage tool for scala that offers statement and branch coverage.
Questions tagged [scoverage]
80 questions
2
votes
1 answer
How to generate xml report with scoverage maven plugin?
I'm trying to generate scoverage xml report to use it in Jenkins. But all I can get is the folder scoverage-classes with my .scala files. Here is a part of my pom.xml:
…

Artem Malinko
- 1,761
- 1
- 22
- 39
2
votes
0 answers
SBT Scoverage: Ignore value assignment
I would like to ignore variable assignments in my project, for example something like this:
val someString = "123"
Will be considered as untested by scoverage, I could mark the line explicitly using comments:
// $COVERAGE-OFF$
val someString =…

Ende Neu
- 15,581
- 5
- 57
- 68
2
votes
0 answers
SCoverage + Jenkins: graph trend shows 0%, xml report is correct
I'm using scoverage plugin for jenkins. It successfully copies generated .xml and .html files to the build directory. But on the project main page the graph shows 0% coverage.
Here is the image: 0% coverage on main page
Any ideas why? Thanks!

mkokho
- 1,036
- 1
- 9
- 9
2
votes
1 answer
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/surefire/api/AbstractSurefireParser
I installed SonarQube Server 4.5 and SonarQube Runner 2.4. I added sonar-scoverage-plugin-1.1.0.jar in sonar plugins directory. In /opt/sonar-runner/sonar-runner.properties, I uncommented
sonar.host.url=http://localhost:9000.
I tried to use sonar…

Ayush Mishra
- 567
- 1
- 7
- 19
2
votes
1 answer
Difference of excluding for scoverageCompile, scoverageTest
Depending on the config (scoverageCompile Vs. scoverageTest) the exclusion of classes happens in scoverage the code coverage varies quite significant.
How does the exclusion of files in combination with scoverageCompile / scoverageTest affect the…

Th 00 mÄ s
- 3,776
- 1
- 27
- 46
1
vote
0 answers
Can Sbt keep instrumented class files alongside non-instrumented?
I go back and forth a lot between coverageOn and coverageOff and every time I switch, Sbt has to recompile modules all over again.
I wonder if, by putting instrumented class files under a different target folder we could reuse the already compiled…

vlfig
- 365
- 1
- 13
1
vote
1 answer
error: java.lang.NoSuchMethodError: 'scala.tools.nsc.reporters.Reporter scala.tools.nsc.Global.reporter()' in scoverage-maven-plugin
I am trying to get some reports with the code coverage information for my project. I found that scoverage-maven-plugin produce xml files covering the % of the different modules that the unit test cases have covered so far.
So I tried to add that…

Ignacio Alorre
- 7,307
- 8
- 57
- 94
1
vote
0 answers
scoverage exclude packages for test vs integration test
in my build.scala i have
coverageExcludedPackages in ThisBuild := ".*dao.*"
which works great for excluding the package from coverage however i want to be able to exclude and include based on the type of tests I'm running.
For instance i run sbt…

kim nguyen
- 11
- 1
1
vote
1 answer
scoverage fails due to unresolved dependency path
IDE_version:
IntelliJ IDEA Ultimate 2021.2.3
Scala_version:
3.1.0
build.properties:
sbt.version=1.5.5
libraryDependencies:
libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.10"
libraryDependencies += "org.scalatest" %% "scalatest"…

prolific-dev
- 31
- 5
1
vote
1 answer
Blank Scoverage HTML Report on Jenkins
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
I'm using scalatest version "3.1.1" and latest coverage plugin version
addSbtPlugin("org.scoverage" %…

bachr
- 5,780
- 12
- 57
- 92
1
vote
1 answer
Setting Scoverage Criteria
Is there a way I could setup a test coverage criteria while running scoverage? Right now I execute the usual following command:
sbt test coverage
This way I get the result but would like to hard code a criteria; for example statement coverage of…

o-0
- 1,713
- 14
- 29
1
vote
1 answer
How to generate both jacoco and scoverage reports with maven in a single jenkins job
I have a multi-module project with java and scala. Both jacoco and scoverage plugins are installed in Jenkins and I want to generate jacoco and scoverage reports (both) in a single build job in Jenkins but only one report is getting generated,…

akish
- 11
- 3
1
vote
1 answer
How to exclude routes and ReverseRoutes files auto generated using scoverage for play scala framework?
How to exclude routes and ReverseRoutes files auto generated using scoverage for play scala framework?
My project structure is as follows.
root
modules
subModule1
subModule2
I tried using following line in root build.sbt but its not…

Shweta Valunj
- 148
- 1
- 11
1
vote
1 answer
VSTS code coverage for Scala
My team is using Microsoft VSTS as SLM tool. We are using Scala for our backend services and code coverage tool is scoverage. Is there a way I can see code coverage for scala services in VSTS? As of now I see only Cobertura and Jacoco supported for…

Ashish K Agarwal
- 1,172
- 3
- 17
- 33
1
vote
0 answers
Covering java and scala source in integration test
I have a question, but after check in google I´m afraid with hard solution.
I´m using Jacoco with a jacoco agent to cover the code of the libraries that I run in my integration test using jacoco agents.
Everything was fine for now, creating the…

paul
- 12,873
- 23
- 91
- 153