test(compose): re-ratchet the JaCoCo line-coverage floor once Compose tests stable (FINAL) #386

Closed
opened 2026-07-06 20:07:42 +00:00 by JMR-dev · 1 comment
JMR-dev commented 2026-07-06 20:07:42 +00:00 (Migrated from github.com)

Final step of #373 — do this only after batches 1-9 have all merged and their Robolectric Compose JVM tests are proven green + stable across the CI matrix.

Task: measure the new whole-app JVM line-coverage baseline (:app:jacocoTestReport), then raise jacocoLineCoverageFloor in app/build.gradle.kts (currently 0.79) to ~0.5-1% below the new measured baseline, in its own PR. Update the "Baseline measured..." comment next to the floor.

Do NOT bundle this into any conversion PR — the whole point of deferring is to re-ratchet against a stable, fully-converted surface. Depends on: batches 1-9. Kept in Backlog (blocked) until they land.

Recommended dispatch order: LAST.


Part of the Robolectric Compose umbrella #373. Infra + PoC landed in PR #375 (Robolectric 4.16.1, testOptions.unitTests.isIncludeAndroidResources=true, src/test/resources/robolectric.properties pins sdk=36, v2 androidx.compose.ui.test.junit4.v2.createComposeRule).

Pattern to follow: app/src/test/kotlin/org/libremail/ui/onboarding/AddAnotherAccountScreenJvmTest.kt — @RunWith(RobolectricTestRunner) + @GraphicsMode(GraphicsMode.Mode.NATIVE) + @Config(sdk = [36]), v2 createComposeRule(), in the test (JVM) source set — NOT androidTest.

Acceptance criteria

  • Robolectric JVM Compose tests for each file below, covering its render + interaction/branch logic.
  • Remove the matching **/<File>* glob(s) from jacocoNonJvmTestableSurface in app/build.gradle.kts as each file gains genuine JVM coverage.
  • Keep the existing instrumented androidTest test(s) — the instrumented E2E stays.
  • Do NOT raise the JaCoCo floor (jacocoLineCoverageFloor, currently 0.79) — the re-ratchet is the final #373 step.
  • Fast gate green: assembleDebug + testDebugUnitTest + jacocoTestCoverageVerification + compileDebugAndroidTestKotlin + lintDebug + ktlintCheck + detekt.
**Final step of #373** — do this only after batches 1-9 have all merged and their Robolectric Compose JVM tests are proven green + stable across the CI matrix. **Task:** measure the new whole-app JVM line-coverage baseline (`:app:jacocoTestReport`), then raise `jacocoLineCoverageFloor` in `app/build.gradle.kts` (currently `0.79`) to ~0.5-1% below the new measured baseline, in its **own** PR. Update the "Baseline measured..." comment next to the floor. **Do NOT** bundle this into any conversion PR — the whole point of deferring is to re-ratchet against a stable, fully-converted surface. Depends on: batches 1-9. Kept in **Backlog** (blocked) until they land. Recommended dispatch order: **LAST**. --- Part of the Robolectric Compose umbrella #373. Infra + PoC landed in PR #375 (Robolectric 4.16.1, `testOptions.unitTests.isIncludeAndroidResources=true`, `src/test/resources/robolectric.properties` pins `sdk=36`, v2 `androidx.compose.ui.test.junit4.v2.createComposeRule`). **Pattern to follow:** `app/src/test/kotlin/org/libremail/ui/onboarding/AddAnotherAccountScreenJvmTest.kt` — `@RunWith(RobolectricTestRunner)` + `@GraphicsMode(GraphicsMode.Mode.NATIVE)` + `@Config(sdk = [36])`, v2 `createComposeRule()`, in the **`test`** (JVM) source set — NOT `androidTest`. **Acceptance criteria** - Robolectric JVM Compose tests for each file below, covering its render + interaction/branch logic. - Remove the matching `**/<File>*` glob(s) from `jacocoNonJvmTestableSurface` in `app/build.gradle.kts` as each file gains genuine JVM coverage. - Keep the existing instrumented `androidTest` test(s) — the instrumented E2E stays. - **Do NOT raise the JaCoCo floor** (`jacocoLineCoverageFloor`, currently 0.79) — the re-ratchet is the final #373 step. - Fast gate green: `assembleDebug` + `testDebugUnitTest` + `jacocoTestCoverageVerification` + `compileDebugAndroidTestKotlin` + `lintDebug` + `ktlintCheck` + `detekt`.
JMR-dev commented 2026-07-07 13:04:50 +00:00 (Migrated from github.com)

Done via PR #418 (merged) — floor re-ratcheted to 0.84. Closing; was stale on Ready.

Done via PR #418 (merged) — floor re-ratcheted to 0.84. Closing; was stale on Ready.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#386