Questions tagged [scoverage]

scoverage is a code coverage tool for scala that offers statement and branch coverage.

80 questions
15
votes
1 answer

How do you impose scala code coverage specifically for integration tests?

Am running the integration test using following sbt command sbt clean coverage it:test coverageReport This command runs integration tests, instruments it and generates report as well. Build.sbt has following: coverageMinimum in IntegrationTest :=…
aditya parikh
  • 595
  • 4
  • 11
  • 30
9
votes
2 answers

scoverage: Combine Coverage from test and it:test

I splitted my Unit- and Integration-Tests with a Filter: lazy val FunTest = config("it") extend Test def funTestFilter(name: String): Boolean = name endsWith "Spec" def unitTestFilter(name: String): Boolean = name endsWith "Test" ... …
pme
  • 14,156
  • 3
  • 52
  • 95
9
votes
1 answer

Is it possible to run Scala SBT Scoverage without running 'sbt clean'

It would be great if one can take advantage of sbt incremental compilation and avoid having to recompile the whole project every time you run your tests, which is exactly what happens when you do clean. The following sequence though: sbt>…
Todor Kolev
  • 1,432
  • 1
  • 16
  • 33
9
votes
1 answer

sbt aggregate coverage reports for unit and integration tests

I use the sbt plugin scoverage to generate test coverage reports for my scala project. However, I'm unable to combine the test reports for unit tests and integration tests. Here are the commands I run sbt coverage test // to run unit tests sbt…
jithinpt
  • 1,204
  • 2
  • 16
  • 33
7
votes
1 answer

Run scoverage from intellij

I was wondering, is it possible to run scoverage from intellij (not from the terminal ) and even better, see scoverage reports like the native coverage from intellij? Thanks
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
7
votes
1 answer

How to run a single scala test with scoverage?

I know that sbt clean coverage test will generate coverage report using all test cases on the project, this takes ages to finish even with the warm JVM. I wish to run coverage on the tests for the code I wrote so, I tried to run a single testcase…
Nkokhelox
  • 179
  • 3
  • 9
7
votes
1 answer

sbt-scoverage exclude syntax

I just started using scoverage for the first time. It's working great for me now, but I encountered a problem with the syntax excluding a package. When my package structure is the following: - com - project - core - excluded …
Corne Elshof
  • 199
  • 3
  • 9
6
votes
1 answer

How to break the build if test coverage fails minimum threshold?

We want to fail the build on codeship if test coverage goes below the threshold value. But it is not failing the build. Scoverage Plugin: addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5") Added following two statements in…
Mahesh Chand
  • 3,158
  • 19
  • 37
5
votes
3 answers

Scoverage how to exclude files and packages?

I am trying to exclude packages and files from the scoverage report. However it does not exclude the specified files and packaged. I am doing this: *api.test.* .*File.scala Could…
axy3yz
  • 131
  • 2
  • 8
5
votes
0 answers

sbt-scoverage's coverageExcludedPackages does not exclude packages

I'm using sbt scoverage 1.3.5 (Scala 2.11.8) and I have a bunch of classes that I do not want to include the the coverage reports. In particular the base classes and their tests are located in com/corp/something/something_else in both main and test.…
Max Power
  • 952
  • 9
  • 24
5
votes
0 answers

How to make scoverage work with multi-project that are not located on the same project-root?

I work with a multi-project structure in scala. Some of the projects are located outside the root-project. There is a simlink to link them and make sbt works. Here is a small example of the structure: some-project root-folder/some-project ->…
Said Abidi
  • 51
  • 1
4
votes
1 answer

scoverage-maven-plugin error with scala 2.12.13

I have scala mvn project. Version of scala was 2.12.3 and scoverage-maven-plugin. 1.3.0 After updating scala version from 2.12.3 to 2.12.13 I have got an error [ERROR] error: java.lang.NoSuchMethodError:…
Slavik Muz
  • 1,157
  • 1
  • 15
  • 28
4
votes
1 answer

How to get Gradle, Scoverage and Sonarqube to work properly?

I have a multi-module Gradle build that compiles Scala code. I would like to scan the code, collect code coverage and feed the results into Sonarqube. My "Hello, World!" for this question is located here. I am runnig the following command: $…
carlspring
  • 31,231
  • 29
  • 115
  • 197
4
votes
0 answers

Scoverage generates no reports for project

Trying to follow the instructions here. My build.gradle looks like this (with some trimming): buildscript { repositories { mavenCentral() } dependencies { classpath 'org.scoverage:gradle-scoverage:1.0.9' …
Cory Klein
  • 51,188
  • 43
  • 183
  • 243
3
votes
0 answers

Scoverage set up for a gradle multi module project issue

For a multi module project on Scala using gradle, there are integration tests in module A that call a method X from this module. This method in turn calls method Y from another module B. I'd expect both X and Y to get coverage but since Y is in a…
afelisatti
  • 2,770
  • 1
  • 13
  • 21
1
2 3 4 5 6