Skip to content

Commit e132e37

Browse files
committed
fix(documentation): improves documentation about jacoco with quarkus
1 parent 442412c commit e132e37

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

docs/backend-workflow.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ The backend workflow (`backend_workflow.yml`) orchestrates the full CI/CD pipeli
7070
5. Add the following plugins to your `pom.xml`:
7171

7272
```xml
73+
<!-- the quarkus-jacoco dependency is only needed if you use quarkus -->
74+
<dependencies>
75+
<!-- collects coverage data for @QuarkusTest and generates report -->
76+
<dependency>
77+
<groupId>io.quarkus</groupId>
78+
<artifactId>quarkus-jacoco</artifactId>
79+
<scope>test</scope>
80+
</dependency>
81+
</dependencies>
7382
<plugins>
7483
<!-- Manages the SonarQube scanner version -->
7584
<plugin>
@@ -104,13 +113,14 @@ The backend workflow (`backend_workflow.yml`) orchestrates the full CI/CD pipeli
104113
<goal>prepare-agent</goal>
105114
</goals>
106115
<configuration>
107-
<!-- Uncomment to exclude Quarkus tests from coverage reports:
116+
<!-- used to exclude all @QuarkusTest from the normal jacoco plugin, this data will be collected by the quarkus-jacoco dependency. -->
108117
<exclClassLoaders>*QuarkusClassLoader</exclClassLoaders>
109-
-->
110118
<destFile>${project.build.directory}/jacoco-quarkus.exec</destFile>
111119
<append>true</append>
112120
</configuration>
113121
</execution>
122+
<!-- if you are not using quarkus you want to remove the exclusion for QuarkusClassLoader above and
123+
activate report execution. (Quarkus generates report with quarkus-jacoco dependency)
114124
<execution>
115125
<id>report</id>
116126
<phase>test</phase>
@@ -121,10 +131,11 @@ The backend workflow (`backend_workflow.yml`) orchestrates the full CI/CD pipeli
121131
<dataFile>${project.build.directory}/jacoco-quarkus.exec</dataFile>
122132
<outputDirectory>${project.build.directory}/jacoco-report</outputDirectory>
123133
</configuration>
124-
</execution>
134+
</execution>-->
125135
</executions>
126136
</plugin>
127137

138+
128139
<!-- Executes integration tests. Can be omitted if there are none.
129140
Passes the same argLine as Surefire to ensure JaCoCo coverage works for integration tests. -->
130141
<plugin>

0 commit comments

Comments
 (0)