1,931 questions
Advice
0
votes
0
replies
29
views
Jacoco Configuration in java Project- Parent pom.xml configuration to include aggregated code coverage of all the modules
root pom.xml file
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<...
Advice
2
votes
4
replies
103
views
How to integrate JaCoCo into a spring boot OCI image to measure E2E testing code coverage?
I am packaging my Spring Boot App with the Spring Boot gradle plugin.
tasks.bootBuildImage {
builder.set("paketobuildpacks/builder-jammy-full:latest")
imageName.set(devImageName)
...
0
votes
0
answers
64
views
How to configure the Maven multi module build to get a CodeCoverage report in Azure with jacoco
I have a Maven Multi-Module Build. This works fine in the Azure Build Pipeline. Now I try to add CodeCoverage Report. For that I added this to my azure-pipelines.yml
- task: PublishCodeCoverageResults@...
0
votes
0
answers
45
views
Jacoco report execution error for Android kotlin based project
I am trying to generate Jacoco report for Android kotlin based project. I am using Android Emulator for running androidTests and generate ec file for coverage. But facing following issue all the time.
...
0
votes
1
answer
129
views
How to use `jacoco-report-aggregation` plugin in a Gradle multi module project?
The source code is here: https://github.com/yvasyliev/telegram-forwarder-bot/tree/feature/multimodule
I have a Gradle multi module project. The sub-modules are:
telegram-forwarder-bot (a console ...
1
vote
1
answer
94
views
How to isolate code coverage to specific interactions, excluding Spring Boot startup, in IntelliJ Ultimate?
I want to use IntelliJ IDEA Ultimate's "Run with Coverage" on a Spring Boot app to see which lines are executed during manual testing (e.g., hitting an endpoint with Postman).
My goal is to ...
0
votes
1
answer
66
views
Jacoco produces truncated xml and csv file
We are using the Jacoco maven plugin to generate the code coverage for some Quarkus project. It has worked fine so far, but recently we have had some occurrences of an intermittent issue on some of ...
0
votes
1
answer
46
views
Getting failsafe coverage for classes in nested modules
I have a repository with multiple projects. There is a project which has all the 'integration-tests' in it.
The 'integration-tests' project runs as follows:
Checks if a service is up.
If service is ...
0
votes
1
answer
29
views
how to add exclusions in gitlab pipeline using jacoco with ant for code coverage of java
How to add exclusions in gitlab pipeline using jacoco with ant for code coverage of java in gitlab? we are not using sonar.
Is there any direct command/property to add exclusions in gitlab?
just ...
-1
votes
1
answer
89
views
Jacoco not producting any output (Maven and Spring Boot)
We have a multi-module Java Maven project structured like this:
parent
├── child-1
├── child-2
└── common
There is no code in the parent, and the code and tests are mostly in common.
We want to ...
0
votes
0
answers
54
views
Can I exclude classes from Jacoco Report via maven pom configuration when I use quarkus-jacoco?
I know I can exclude classes from the Jacoco report via the application.properties with quarkus.jacoco.excludes but is there a way to exclude it with the configuration you can set via jacoco maven ...
0
votes
0
answers
43
views
How to send aggregated jacoco coverage report to coveralls?
I am generating an aggregated jacococ coverage report in a Maven module project like below
<build>
<plugins>
<plugin>
<groupId>org.jacoco<...
0
votes
0
answers
88
views
Pull JaCoCo Code Coverage Report from the SonarQube to Be Able to See Code Coverage During PR Review
Environment
Bitbucket Data Center v8.17.0
Bamboo 8.2.9
SonarQube v2025.1.1
Current Setup
Hi Atlassian Community!
I currently have the following workflow implemented:
Create Pull Requests in ...
0
votes
0
answers
39
views
Don't know which branch is missing in jacoco report
I am writing Unit test for usecase in kotlin but don't know how to cover missing branch.
// ConnectFTPUseCaseImpl
// ConnectFTPUseCase
interface ConnectFTPUseCase {
suspend fun connect(): Result&...
0
votes
0
answers
114
views
Problem with Mockito and Junit when fulfilling coverage in Jacoco
Good afternoon, I'm testing a microservice with Junit and Mockito in Quarkus (a Java framework). I'm also using Jacobo for Covegare. However, the EventRepositoryImplTest class, which simulates ...
0
votes
0
answers
28
views
Sonar code coverage with both Unit and Integration test inclusion
We have a multimodule project which has 4 module
All IntegrationTest cases are written in a separate module which has no source code only src/test/java folder.
All UnitTest are written in other 2 ...
0
votes
0
answers
60
views
Jacoco Report missing while executing mvn clean install command
I'm trying to create a jacoco report on our project The project is in java 17 version and the jacoco-maven-plugin is on version 0.8.8.In the target folder the jacoco.exec file gets created. But the ...
0
votes
2
answers
138
views
With the Gradle JaCoCo plugin, how to include coverage data of an additional test task?
I am using Gradle in version 8.13.
I am using the Gradle JaCoCo Plugin.
Besides the default Gradle test task, I have added an additional test task to some of the Gradle subprojects:
var ...
0
votes
0
answers
542
views
Jacoco Report Showing 0% Coverage Despite All Tests Passing - How to Ensure Minimum 60% Coverage?
I'm working on a Java project using Maven, and I've been trying to generate a Jacoco code coverage report. However, even though all of my test cases are passing successfully, the generated Jacoco ...
-1
votes
1
answer
119
views
Import exported Jacoco coverage reports to and from IntelliJ IDEA
I can run my tests with Jacoco test coverage in IntelliJ IDEA, and export them to an HTML file. And IntelliJ IDEA provides an import option for Jacoco XML files, but is there a way to export that XML ...
2
votes
2
answers
158
views
1 of 6 branches missing issue using Jacoco
I am stuck in a situation where I am not able to fix the 1 of 6 branches issue. Below is the small code I tried to produce
package org.example;
public class Testing {
public static final String ...
0
votes
1
answer
283
views
How to have single Jacoco code coverage report for multi-module project
I'm working on an Android project using Gradle and JaCoCo to generate code coverage reports. Currently, my jacoco.gradle file is configured as follows:
apply plugin: 'jacoco'
def coverageSourceDirs = ...
0
votes
0
answers
219
views
Extract total coverage from JaCoCo report
How can we extract the total coverage from JaCoCo? I just need that number to use it for external reporting. I see the coverage total in the Jacoco report (HTML), but do not see it in the jacoco.xml.
...
0
votes
0
answers
226
views
SonarQube code coverage with JaCoCo in Multi module maven
There are lots of answered questions on SO, but I still can't get this to work. I have a multi module Maven project. I followed https://www.baeldung.com/maven-jacoco-multi-module-project to set up ...
0
votes
0
answers
30
views
Jacoco Aggregate Report Not Showing the Junit Coverage for Submodule classes where test classes present in Main module
ParentModule - POM
MainModule - POM - Few Classes and (All Junits - MainModule + SubModule)
SubModule - POM - All Service Classes (No Junits)
SonarQube Server shows Junit test coverage for Mainmodule ...
0
votes
1
answer
168
views
Jacoco: Report not generated for android project
I just integrated Jacoco code coverage for junit and UI test in my android studio project.
I added following steps:
In my app level build.gradle file:
apply plugin: 'jacoco'
and then added below code ...
5
votes
2
answers
1k
views
Gitlab 17.4 JaCoCo coverage report
We would like to see the visual of the Jacoco code coverage report in gitlab.
This question is not about cobertura.
It seems the feature of displaying Jacoco coverage is now ready, starting gitlab 17....
0
votes
0
answers
91
views
Integrationtest-Coverage of an Quarkusapplication with Jacoco and Cucumber shows 0% Coverage
Since two days I am struggling with this issue. I have 4 Microservices all running with Quarkus (for now they are all running with differenct ports on localhost). In a local Maven Module I run ...
0
votes
1
answer
44
views
How to build javaagent jacoco flag through code?
I have a spring app using failsafe and to run IT's by launching the application jar through custom code, and there is no organizational appetite to have it run directly through maven.
To get test ...
0
votes
0
answers
40
views
JaCoCo Code Coverage Under Default Element - How to Fix?
I'm using JaCoCo to measure unit test coverage in my Android project. While analyzing the report, I noticed that the code coverage for my classes is being grouped under the default package instead of ...
0
votes
0
answers
19
views
Is there a way to enable and disable gradle-jacoco freely?
I applied jacoco plugin via init.gradle.
What I want to enable is as follows:
test without jacoco
test with jacoco
initscript {
repositories {
mavenCentral()
}
}
allprojects {
...
0
votes
1
answer
124
views
The problem is that coverage is 0% in the project analysis with Sonarqube
I want to analyze my SpringBoot project with SonarQube. I released the unit test but everything works successfully. The problem is that the coverage is 0%. I added the Jacoco dependency but the ...
1
vote
1
answer
349
views
Jacoco errors in sample - karate-demo
We are expanding our test coverage and attempting to implement the support for code coverage as documented in the readme - https://github.com/karatelabs/karate/tree/master/karate-demo#code-coverage-...
0
votes
0
answers
114
views
Is there a way to exclude classes with same package name, but are present in different folders from JaCoCo code coverage report?
This is my folder structure:
- src
- main
- java
- com.chintan.project
- src-gen
- com.chintan.project
Is there a way to exclude the classes of package com.chintan.project which ...
0
votes
0
answers
54
views
Coverage Checks always 0%
In terminal, mvn verify is returning a test coverage of 0%
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.39 s -- in uk.ac.rhul.cs2800.Cw2ApplicationTests
[INFO] Running uk....
0
votes
0
answers
38
views
Jacoco Implementation in AWS
In my project, we need to generate the jacoco report for the external tests for the application/service deployed in AWS. In local system when making the service up by running the jar using java -jar ...
1
vote
1
answer
64
views
Use jacoco to analyse a java program that would fail
I have a java program and I'm using jacoco to do coverage analysis. Now I encounter a problem that jacoco treat the line throwing out an exception as unexecuted.
For example in the following program:
...
0
votes
0
answers
36
views
code coverage showing less coverage with lambda methods
I am using testng and mockito for integration tests and unit test respectively.
I rarely using java8 lambda functions in the project. Still the code coverage showing too many lambda methods with 0% ...
0
votes
0
answers
50
views
How to exclude some classes when using jacococli.jar to generate coverage report
I have a project that contains many modules. In order to accelerate the speed of unit testing, I separated these modules and ran unit testing separately. Then, I hope to merge the results and generate ...
0
votes
1
answer
33
views
Jacoco report with test separated from main code
I have a spring-boot project named portal-jup, where the main code is under sub-module portal-jup-biz, and the test code is under sub-module portal-jup-test, I could generate code coverage report ...
0
votes
1
answer
51
views
Jenkins pipeline not able to find xmlReportPaths
while trying to add the jacoco coverage report to sonarqube, for my multimodule java project (maven). The report was not showing on the sonarqube dashboard.
After checking the logs I found this ...
0
votes
1
answer
138
views
Code Coverage For Android Integration Tests In Multi-Module App
I am looking for some help generating a code coverage report for Android integration tests in a multi-module project. Specifically I have an app module along with a mix of android and java library ...
0
votes
1
answer
91
views
Using JaCoCo real time instrumentation for Grails web application running under Tomcat
We try to use JaCoCo (0.8.12) to collect code coverage information in the Grails (5.3.3) web application compiled for Java11 and running under Tomcat (9.0.88).
Following JaCoCo instructions, I tried ...
2
votes
1
answer
72
views
Jacoco coverage for openliberty integration tests
We have integration tests in our app in a self contained module within the project. Similar to the ones in this openliberty tutorial https://openliberty.io/guides/rest-intro.html#testing-the-service
...
0
votes
1
answer
47
views
how to record java execute path? [duplicate]
I want to know my customer how to use my application. for example, i have a spring-web applicaiton. customer call the service 100 times.
i want to analyst every time service's execute path.
eg.
1 time ...
0
votes
1
answer
135
views
How to make IDEA ignore unreachable branches in test coverage statistics?
I want to achieve 100% test coverage, but there are always some unreachable branches. How can I make IDEA exclude these unreachable branches from coverage statistics?
For example:
public static Class ...
1
vote
0
answers
120
views
How to customize the location of path to be passed in gitlab-ci.yml for generating junit reports
Code-snippet-
gitlab-ci.yml
test:
extends: .exec_template
stage: test
script:
- chmod 755 -R build_unit_test.sh
- ./build_unit_test.sh
coverage: '/Total.*?([0-...
0
votes
1
answer
291
views
Child module CCReport43F6D5EF not found when using azure pipelines task Maven@4
We are migrating to from Maven@3 task to Maven@4 see here. This works fine for most repositories, except for the multi model repository. This give me then the following error:
[ERROR] [ERROR] Some ...
1
vote
0
answers
333
views
Error : Could not get unknown property 'JacocoMerge' for root project of type org.gradle.api.project || in Gradle 8.5 with Java 21
Facing issue for JacocoMerge Task Below are version details:
Java - 21
Gradle - 8.5
Jacoco - 0.8.11
Below are gradle code
`task jacocoMerge(type:JacocoMerge){
destinationFile = file(filePath)
...
1
vote
0
answers
52
views
Jacoco code coverage report with karate testcases and maven project , original code and karate testcases present in different project
I want to create jacoco code coverage report of my maven project. My Main code present in different maven project and testcases are present in different maven project. I want code coverage report of ...