Questions tagged [jacoco-plugin]
73 questions
9
votes
0 answers
How to configure sonar.junit.reportPaths
I have tried severally to configure this sonarqube property sonar.junit.reportPaths within Gradle but still get the same error message.
Gradle version -> 6.7.1
SonarQube Server version -> 8.9 (docker image)
Java version -> openjdk 11.0.2
Intellij…

Sammy65
- 627
- 2
- 12
- 28
9
votes
1 answer
ERROR in jacoco check - The parameters 'rules' are missing or invalid
This is the error I get when running mvn jacoco:check for a maven application. Due to that, the report is not generated.
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.3:check (default-cli) on project
Netflix: The…

Bu5to
- 93
- 1
- 1
- 3
8
votes
2 answers
Caused by groovy.lang.MissingPropertyException Could not get unknown property 'android' for project ':lib1' of type org.gradle.api.Project
To solve my problem here: Applying JaCoCo to all Android Studio gradle modules, I applied the solution here. This works fine so far for modules with
plugins {
id("com.android.library")
}
As soon as I add the required apply from:…

Edna Krabappel
- 362
- 1
- 2
- 16
7
votes
1 answer
Merge coverage unit and integration test result generated with jacoco-report-aggregation plugin on gradle 7.4
I am migrating my project to Gradle 7.4 and i would like to use the new plugin jacoco-report-aggregation to generate unit and integration test coverage report perfectly merged to be sent to sonarqube.
i m using jvm testing suite on each…

Gerald LEVI
- 71
- 3
7
votes
4 answers
Configure jacocoTestReport to read multiple .exec files as input
In my gradle build I have 2 test tasks like this:
task testAAA(type: Test) {
filter {
includeTestsMatching "*AAA*"
}
finalizedBy jacocoTestReport
}
and
task testBBB(type: Test) {
filter {
includeTestsMatching…

MattG
- 5,589
- 5
- 36
- 52
6
votes
1 answer
java.lang.LinkageError: loader 'bootstrap' attempted duplicate class definition for java.lang.$JaCoCo with Java11 and Jacoco 0.8.5
I am getting following error while running a test project in Jenkins
Caused by: java.lang.LinkageError: loader 'bootstrap' attempted duplicate class definition for java.lang.$JaCoCo. (java.lang.$JaCoCo is in module java.base of loader…

Abhishek Kumar
- 71
- 1
- 6
6
votes
1 answer
Java.lang.IllegalStateException: Failed to parse JaCoCo XML report: jacoco.exec
I am trying to publish my coverage report generated by Jacoco plugin - jacoco.exec. But I get the below exception with the mentioned sonar and Jacoco configuration.
SonarCube version 6.7.7
[ERROR] Coverage report 'jacoco.exec' could not be…

ragul rangarajan
- 167
- 2
- 12
5
votes
2 answers
Upgrade to AGP 4.2.0 ,unable to generate Jacoco code coverage report
Jacoco code coverage was working fine till I upgrade Android Gradle Plugin to 4.2.0 , no only app module code coverage getting generated, for modules it is not working.
Any Idea how to fix this issue.

Dev Soni
- 489
- 4
- 12
4
votes
1 answer
Using quarkus-jacoco for test that aren't annotated with @QuarkusTest
According to Quarkus Documentation, to have JaCoCo considering test classes that aren't annotated with @QuarkusTest, the only thing we need to do is to configure the jacoco plugin to execute the goal prepare-agent.
I've added that, the same as the…

Manollo Guedes
- 51
- 3
4
votes
2 answers
How do I get a Jacoco coverage report using gradle plugin when all my tests are in a separate submodule
I'm having trouble setting up jacoco coverage for my java project since I'm new to gradle. My final goal is to connect this to sonarqube. All my tests are in a separate…

MysticForce
- 1,253
- 1
- 16
- 27
3
votes
0 answers
Classes in bundle 'app' do not match with execution data - Android
Although similar questions are already present on internet, but I am unable to find any solution to this problem with regards to android platform. My project has multiple product flavors, uses kotlin and hilt. I believe byte code transformation…

NightFury
- 13,436
- 6
- 71
- 120
3
votes
0 answers
How to apply JaCoCo to build.gradle?
I wanted to add JaCoCo to an existing Android Studio Project. In my settings.gradle I edited:
pluginManagement {
gradle.ext.kotlin_version = "1.6.0"
repositories {
google()
mavenCentral()
}
def versionsProp = new…

Ralf Wickum
- 2,850
- 9
- 55
- 103
3
votes
0 answers
Jacoco can't find source files despite setting source directory in build.gradle
I want to get line coverage in my source files for my test coverage results. The test results in the generated table have columns for missed lines, and even for missed control flows. According to stuff I've read, this means if the source files are…

John Glen
- 771
- 7
- 24
3
votes
2 answers
How to get or parse coverage persentage of Jacoco report in GitHub Actions
I have Spring Boot app it uses gradle for build and package. I have configured Jacoco plugin and generating report in my local as HTML. I want to include it in my GitHub build workflow so whenever build runs I want to upload/store that Jacoco…

springbootlearner
- 1,220
- 4
- 26
- 48
3
votes
0 answers
Jacoco not analyzing inline extension functions of interface
I have following interface with an extension function in an Android project
interface MyInterface {
fun aMethod(): String
}
private inline fun MyInterface.myExtensionFunction(
aString: String?,
) = with(aString) {
//Some…

Nicolás Arias
- 1,053
- 1
- 12
- 29