You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No coverage tooling was configured, giving maintainers zero visibility into which code paths are actually tested. This PR adds JaCoCo so every CI run produces an HTML/XML/CSV coverage report that can be downloaded as an artifact.
Changes
pom.xml β adds jacoco-maven-plugin 0.8.11 with two executions:
prepare-agent (default initialize phase): instruments bytecode before Surefire runs tests
report (bound to verify phase): generates HTML, XML, and CSV reports under target/site/jacoco/
.github/workflows/ci.yml β adds two steps after Run Tests:
Generate coverage report β runs mvn jacoco:report -B with if: always() so the report is generated even when pre-existing test failures exit non-zero
Upload coverage report β uploads target/site/jacoco/ as a CI artifact (coverage-report, 30-day retention)
Baseline Coverage (from this PR branch)
Metric
Covered
Total
%
Instructions
1 930
4 553
42%
Branches
141
397
35%
Lines
400
1 001
39%
Note: ~12% of instruction coverage comes from DataInitializer executing during @SpringBootTest setup β not from dedicated tests. Effective "intentional" coverage is lower. This is why Issue #20 (meaningful coverage) is the next priority.
Notable gaps visible in the report:
Controllers: ~1% β only the Spring MVC setup path is hit, no endpoint tests
UserService: ~1% β zero unit tests
NotificationService: ~11% β very limited coverage
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the patch from the workflow run
gh run download 28671834478 -n agent -D /tmp/agent-28671834478
# Create a new branch
git checkout -b test-assist/jacoco-coverage-setup-e48ff900304a51de main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-28671834478/aw-test-assist-jacoco-coverage-setup.patch
# Push the branch and create the pull request
git push origin test-assist/jacoco-coverage-setup-e48ff900304a51de
gh pr create --title '[test-improver] Add JaCoCo code coverage reporting' --base main --head test-assist/jacoco-coverage-setup-e48ff900304a51de --repo Study4/agentic-workflow-demo
Generated by Test Improver Β· 102.9 AIC Β· β 10.7 AIC Β· β 10.9K Β· β· Comment /test-assist to run again
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/test-improver.md@1c6668b751c51af8571f01204ceffb19362e0f66
π€ Test Improver β automated AI assistant focused on improving test infrastructure.
Implements the requirements from Issue #26.
Goal & Rationale
No coverage tooling was configured, giving maintainers zero visibility into which code paths are actually tested. This PR adds JaCoCo so every CI run produces an HTML/XML/CSV coverage report that can be downloaded as an artifact.
Changes
pom.xmlβ addsjacoco-maven-plugin0.8.11 with two executions:prepare-agent(defaultinitializephase): instruments bytecode before Surefire runs testsreport(bound toverifyphase): generates HTML, XML, and CSV reports undertarget/site/jacoco/.github/workflows/ci.ymlβ adds two steps afterRun Tests:Generate coverage reportβ runsmvn jacoco:report -Bwithif: always()so the report is generated even when pre-existing test failures exit non-zeroUpload coverage reportβ uploadstarget/site/jacoco/as a CI artifact (coverage-report, 30-day retention)Baseline Coverage (from this PR branch)
Notable gaps visible in the report:
Trade-offs
Test Status
Pre-existing failures (not caused by this PR):
DateUtilsTest.testGetQuarterβ off-by-one bug (Issue π΄ [BUG] getQuarter() returns 0-3 instead of 1-4 (off-by-one bug)Β #6)TaskServiceTest.testGetTaskStatisticsβ division by zero (Issue π΄ [BUG] ArithmeticException: Division by zero on empty project dashboardΒ #3)Coverage report generates successfully with
if: always()even when tests fail.Reproducibility
Warning
Protected Files β Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
Protected files
pom.xmlCreate the pull request manually
Add this agentic workflows to your repo
To install this agentic workflow, run