scoverage is a code coverage tool for scala that offers statement and branch coverage.
Questions tagged [scoverage]
80 questions
0
votes
0 answers
Want to eliminate: "[WARNING] Could not determine source for class com.mycompany.MyClass_" when building Java + Scala project
I am using maven with the scala-maven-plugin for building a project that is a mixture of Java 1.8 and Scala 2.12.7 code. When I build from the command line with:
mvn clean install -DskipTests
I get messages like:
"[WARNING] Could not determine…

kc2001
- 5,008
- 4
- 51
- 92
0
votes
1 answer
Scala SBT Plugin Version Error During Build
I keep getting the following error from my GitHub Actions workflow:
[info] welcome to sbt 1.7.1 (Eclipse Adoptium Java 11.0.16.1)
[info] loading settings for project plant-simulator-build from plugins.sbt ...
[info] loading project definition from…

joesan
- 13,963
- 27
- 95
- 232
0
votes
0 answers
Multi module Scala project gives 0% sonar code coverage
I am using SonarQube Enterprise EditionVersion 7.9.1. I am running maven goal for my multi-module scala project as :
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify…

Priya
- 173
- 6
- 18
0
votes
1 answer
Contribute scoverage code coverage to multiple Gradle projects in a multi-project build
I am using gradle-scoverage with a multi-project Gradle build. I want to make use of the fact that :projectB's tests exercise code in :projectA. But gradle-scoverage 7.0.0 does not show any code coverage for the relevant line in :projectA in the…

Robin Green
- 32,079
- 16
- 104
- 187
0
votes
0 answers
Conflicting cross-version on scalac-scoverage-runtime
I'm trying to run scoverage on a crossBuild sbt coverage +test coverageAggregate and i'm getting:
[error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/Users/module/"), "module_name"):
[error] …

AdrianS
- 1,980
- 7
- 33
- 51
0
votes
0 answers
C++ fuzz test with libfuzzer.a
i use libfuzzer.a to code my first fuzz test,
here is my code
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
int size = Size;
printf("size=%d",Size);
return 0; // Non-zero return values are reserved for future…

tianyu
- 119
- 1
- 10
0
votes
1 answer
How to use scoverage with Flink shadowjar custom gradle dependency configuration
Summary
I've got a Gradle Flink Scala project and am trying to add Scoverage reports, but the compileScoverageScala task can't find all the dependencies due to the custom shadow jar configuration.
build.gradle
Here's the build file, which follows…

D Perkins
- 123
- 1
- 10
0
votes
1 answer
how to interpret scoverage.xml report
I am using the scoverage in Scala project. During the build, I generate coverage HTML and XML reports.
I need to parse the XML file (i.e. scoverage.xml) to extract metrics for each class on:
* lines coverage: number of covered ones vs total
*…

bachr
- 5,780
- 12
- 57
- 92
0
votes
1 answer
Scala sbt scoverage plugin resolution with Nexus proxy
I am using scoverage plugin in my project project/plugins.sbt:
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
This resolves fine when I do not use our company nexus.
To test our nexus proxy I added below at…

irrelevantUser
- 1,172
- 18
- 35
0
votes
1 answer
Getting Code coverage for scala based batch jobs
I have a batch job developed in scala. I am triggering the job with a shell script and would like to measure the code coverage for the job.
The job is triggered after build creation.
How to the start scoverage after this job?

sri_ae
- 3
- 2
0
votes
1 answer
How to ignore some class path from gradle scoverage coverage reports?
how testScoverage task can be configured in Gradle Scoverage to exclude some class from test coverage. In sbt scoverage that can be achieved by adding in settings
coverageExcludedPackages := ";Reverse.*;.AuthService.;models\.data\..*
How to achieve…

user9093584
- 3
- 3
0
votes
0 answers
Overwriting test task in gradle
I want to overwrite test task in gradle (I am using Gradle 4.3 version at this moment) to change the behavior of this task.
Specifically, I am using scoverage gradle plugin in a Scala project and I want to execute $ gradle test to call test task and…

Sergio Rodríguez Calvo
- 1,183
- 2
- 16
- 32
0
votes
0 answers
Unable to get code coverage for a scala application using Scoverage
I am unable to measure code coverage for my scala application using the tests written in Python. Steps followed to generate the report,
Compile the application
activator -Dsbt.override.build.repos=true -Dsbt.repository.config=./repositories…

Krishhna
- 21
- 2
0
votes
1 answer
SBT : Overriding default test task
In our play project, we are running scoverage coverageReport using the following command:
sbt clean coverage test coverageReport
Instead of the explicit coverageReport goal , I want to run the report as part of test goal itself , something like
sbt…

SurMan
- 271
- 10
- 22
0
votes
1 answer
Variable code coverage threshold with sbt-scoverage
I'm using sbt-scoverage plugin for measure the code (statement) coverage in our project. Because of months of not worriying about the coverage and our tests we decided to set a threshold for having a minimum coverage percentage: if you are writing…

Alejandro Echeverri
- 1,328
- 2
- 19
- 32