Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Auszug
hiddentrue

Nuclos JaCoCo: code coverage, offline weaving, jacoco-maven-plugin, jacoco.exec, coverage profile, mvn verify, AspectJ.

globe with meridians Language: Deutsch · English

hammer and wrench Code coverage (JaCoCo)

Code coverage with JaCoCo – offline weaving, coverage profile and report generation.

Status
colourPurple
titleHow-to
Status
colourBlue
titleDeveloper
Status
colourGreen
titleUpdated: Jul 2026
Status
colourGrey
titleapplies to Nuclos 4.2026.x

Panel
bgColor#F4F5F7

On this page

Inhalt
maxLevel2
minLevel2

Code coverage of the Nuclos build and the integration tests is measured with JaCoCo (from v4.2024.13).

Process

  1. Offline weaving via the jacoco-maven-plugin after javac but before the AspectJ bytecode manipulation (runtime online weaving did not work for Nuclos due to AspectJ/Spring weaving).
  2. Include the JaCoCo runtime as a dependency in all Maven modules.
  3. Unit and integration tests write all coverage data to $NUCLOS_GIT_ROOT/target/jacoco.exec.

Invocation

Activation via the Maven profile coverage, e.g. for the Tomcat server integration tests:

Codeblock
languagebash
mvn clean verify -Dlocale=de_DE -Dtest.webclient.skip=true -P coverage,test,test-tomcat

Create a report per module:

Codeblock
languagebash
mvn jacoco:report@coverage-report
Info
titleSonar integration

The Sonar code analysis automatically uses the JaCoCo reports if present.

Related pages

gear Sonar code analysis


Sonar.

Open →

gear Unit tests with TestNG or JUnit and Spring support


Unit tests.

Open →