docs(android): add test coverage plan to reach the 50% gate
Post-#26 the JaCoCo→Sonar wiring is live and coverage measures 16.4% on new code — under the 50% gate. Add COVERAGE_PLAN.md: a bucketed analysis of the gap (ViewModels 0.1%/1153 lines is the dominant lever; DTOs, repositories, core utils next) and a phased plan — Phase 0 broadens coverage exclusions to drop non-unit-testable UI/framework code, Phases 1–4 test DTOs, ViewModels, repositories, and core. Includes a MainDispatcherRule harness + VM test pattern and per-phase coverage projections (Phase 2 clears the gate at ~65%). Cross-linked from PLAN.md §12.1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgyHnrNa8WwG3doxvxjuCr
This commit is contained in:
@@ -1002,6 +1002,10 @@ informational. The project is clean (0 bugs / 0 vulns / 0 hotspots, Maintainabil
|
||||
gate failure is **coverage = 0% on new code**, which is a *reporting* gap, not a testing gap — the
|
||||
25-file JVM unit suite exists, but the source-only Sonar scan never received a JaCoCo report.
|
||||
|
||||
> Once the wiring below landed (`Android-app#26`), real coverage measured **16.4%** on new code —
|
||||
> still under the 50% gate. The plan to raise it (exclude non-unit-testable framework/UI code + test
|
||||
> ViewModels/DTOs/repositories) lives in [`COVERAGE_PLAN.md`](./COVERAGE_PLAN.md).
|
||||
|
||||
**Coverage wiring (the fix):**
|
||||
- Apply the `jacoco` plugin in `app/build.gradle.kts` + a `jacocoTestReport` task fed by
|
||||
`testDebugUnitTest`, emitting XML. Exclude generated/DI/Compose scaffolding
|
||||
|
||||
Reference in New Issue
Block a user