Skip to content

Expose CRAP metrics in GitLab-visible JUnit XML fields#198

Merged
fabian-barney merged 2 commits into
mainfrom
codex/197-gitlab-junit-metrics
Jun 1, 2026
Merged

Expose CRAP metrics in GitLab-visible JUnit XML fields#198
fabian-barney merged 2 commits into
mainfrom
codex/197-gitlab-junit-metrics

Conversation

@fabian-barney

Copy link
Copy Markdown
Owner

Summary

  • add GitLab-visible CRAP, cognitive complexity, and coverage details to JUnit testcase names
  • add testcase-level system-out diagnostics while preserving the existing JUnit properties and failure/skipped body text
  • update formatter and integration tests plus README documentation

Validation

  • mvn -B -ntp -P!quality-gates-all -pl core '-Dtest=MainTest,ReportFormatterTest' test
  • mvn -B -ntp -P!quality-gates-all verify

Closes #197

Copilot AI review requested due to automatic review settings June 1, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the JUnit XML “sidecar” output to surface CRAP/complexity/coverage details in GitLab-visible JUnit fields (notably the testcase name and testcase-level system-out), while preserving the existing JUnit properties and existing failure/skipped body text behavior. This aligns the tool’s output with GitLab’s Tests tab parsing limitations described in issue #197.

Changes:

  • Extend JUnit testcase name to include a concise metrics summary (CRAP, CC, Cov + kind).
  • Add testcase-level <system-out> diagnostics containing the same detailed diagnostic text already used for failure/skipped bodies.
  • Update unit/integration tests and README documentation to reflect the new JUnit XML shape.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Documents the new GitLab-friendly JUnit testcase naming and testcase-level system-out diagnostics.
core/src/main/java/media/barney/crap/core/ReportFormatter.java Adds metric summary to testcase names and emits testcase-level system-out while preserving existing failure/skipped text and properties.
core/src/test/java/media/barney/crap/core/ReportFormatterTest.java Updates formatter tests to assert the new testcase name shape and the presence/content of testcase-level system-out.
core/src/test/java/media/barney/crap/core/MainTest.java Updates integration assertions to match the new testcase name format in the JUnit sidecar.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@fabian-barney fabian-barney merged commit c86e82a into main Jun 1, 2026
21 checks passed
@fabian-barney fabian-barney deleted the codex/197-gitlab-junit-metrics branch June 1, 2026 15:09
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.

Expose CRAP metrics in GitLab-visible JUnit XML fields

2 participants