Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profile for coverage reports with JaCoCo #283

Closed
kwin opened this issue Dec 20, 2024 · 2 comments
Closed

Add profile for coverage reports with JaCoCo #283

kwin opened this issue Dec 20, 2024 · 2 comments

Comments

@kwin
Copy link
Member

kwin commented Dec 20, 2024

The defacto standard for code coverage calculation with Maven/Java is JaCoCo. A profile should be provided in the ASF parent which collects coverage data for both UTs/ITs and creates reports as outlined in https://www.eclemma.org/jacoco/trunk/doc/examples/build/pom-it.xml.
Those reports should be usable also for https://docs.sonarsource.com/sonarqube-server/10.7/analyzing-source-code/test-coverage/java-test-coverage/ (i.e. be emitted with default filenames) or https://github.com/codecov/example-java-maven

Default locations for sonar.coverage.jacoco.xmlReportPaths (can be overridden) are

  1. target/site/jacoco/jacoco.xml
  2. target/site/jacoco-it/jacoco.xml
  3. build/reports/jacoco/test/jacocoTestReport.xml

TODO: Check if SonarQube supports separate reports for ITs and UTs or requires them in merged format.

@kwin kwin changed the title Add profile for Coverage reports with JaCoCo Add profile for coverage reports with JaCoCo Dec 20, 2024
@kwin
Copy link
Member Author

kwin commented Dec 21, 2024

Also note jacoco/jacoco#1676.

kwin added a commit that referenced this issue Dec 21, 2024
Add dedicated profile "coverage" to generate separate reports for both
UTs and ITs.

This closes #283
kwin added a commit that referenced this issue Dec 21, 2024
Add dedicated profile "coverage" to generate separate reports for both
UTs and ITs.

This closes #283
kwin added a commit that referenced this issue Dec 21, 2024
Add dedicated profile "coverage" to generate separate reports for both
UTs and ITs.

This closes #283
@kwin
Copy link
Member Author

kwin commented Jan 10, 2025

There was strong resistance in the PR, therefore closing as won’t fix.

@kwin kwin closed this as completed Jan 10, 2025
@kwin kwin reopened this Jan 10, 2025
@kwin kwin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant