Skip to content

Aggregate Coverage#746

Draft
Schmarvinius wants to merge 3 commits intomainfrom
chore/aggregate_coverage
Draft

Aggregate Coverage#746
Schmarvinius wants to merge 3 commits intomainfrom
chore/aggregate_coverage

Conversation

@Schmarvinius
Copy link
Collaborator

@Schmarvinius Schmarvinius commented Mar 9, 2026

Add Aggregated JaCoCo Coverage Report Module

Chore

🔧 Introduces a dedicated coverage-report Maven module that aggregates JaCoCo coverage data from both unit tests and integration tests into a single combined report for SonarQube analysis.

Changes

  • coverage-report/pom.xml: New Maven module (cds-feature-attachments-coverage-report) that:

    • Merges .exec files from unit tests (cds-feature-attachments) and integration tests (integration-tests/srv) into a single jacoco-merged.exec
    • Generates an aggregated JaCoCo HTML/XML/CSV report via report-aggregate
    • Enforces coverage thresholds (≥95% instruction, branch, and complexity coverage; 0 missed classes) on the merged data
    • Skips deployment, SpotBugs, and PMD since it contains no source code
  • integration-tests/srv/pom.xml: Added the JaCoCo prepare-agent execution so integration tests produce a jacoco.exec file that can be merged into the aggregate report.

  • pom.xml:

    • Registered the new coverage-report module in the root build.
    • Excluded cds-feature-attachments-coverage-report from Maven Central publishing.
    • Updated the skip-integration-tests profile comment to reflect the new module exclusion.
  • .github/actions/scan-with-sonar/action.yml:

    • Simplified the Maven build command from a targeted -pl build to a full mvn clean verify -ntp -B across all modules.
    • Added a verification check for the new coverage-report/target/site/jacoco-aggregate/jacoco.xml report.
    • Appended the aggregate report path to sonar.coverage.jacoco.xmlReportPaths.
  • .pipeline/config.yml: Added coverage-report/target/site/jacoco-aggregate/jacoco.xml to the sonar.coverage.jacoco.xmlReportPaths configuration so SonarQube picks up the combined coverage data.

  • 🔄 Regenerate and Update Summary

📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

PR Bot Information

Version: 1.17.99 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 85339b70-1bd2-11f1-84f6-1f9a6a0e1284
  • Event Trigger: pull_request.opened
  • Summary Prompt: Default Prompt

@Schmarvinius Schmarvinius changed the title Chore/aggregate coverage Aggregate Coverage Mar 9, 2026
Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR introduces an aggregated JaCoCo coverage report module with a few correctness issues: the Maven phase ordering for the merge/check executions doesn't guarantee the merged .exec file exists before the coverage check runs, the dataFileExcludes filter targets a path that never contains .exec files, and the integration-tests dependency carries an explicit version that should be managed centrally. These should be addressed before merging.

PR Bot Information

Version: 1.17.99 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 85339b70-1bd2-11f1-84f6-1f9a6a0e1284
  • Event Trigger: pull_request.opened

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 this pull request may close these issues.

1 participant