Separate unit tests from integration tests by name (v1.27.2) #91

Merged
mi merged 1 commits from separate-unit-and-integration-tests into main 2026-10-02 07:16:30 +02:00
Owner

Groundwork for mutation testing with PIT and werkcrappit.

  • Every spec ends in *UnitTest (no Spring, no real git/process), *RestTest (@WebMvcTest slice) or *IntegrationTest (full context, real git, processes, WireMock, containers): 55 / 9 / 14; 77 files renamed, file and class.
  • Gradle tasks unitTest (UnitTest + RestTest, 16 s test time) and integrationTest (40.5 s); test and CI unchanged.
  • TestNamingConventionUnitTest fails for a spec without a suffix.
  • AGENTS.md and the writing-tests skill describe the convention.

Found on the way: PIT's timeouts on Werkator came from its 4 s limit, not from the integration tests (323 → 2 timeouts at 20 s); that goes into the next PR together with PIT and werkcrappit.

CI on werkator.javagil.de: green (141 s).

PR-doc: docs/prs/2026-10-01-PR#91-separate-unit-and-integration-tests.md

🤖 Generated with Claude Code

Groundwork for mutation testing with PIT and werkcrappit. - Every spec ends in `*UnitTest` (no Spring, no real git/process), `*RestTest` (`@WebMvcTest` slice) or `*IntegrationTest` (full context, real git, processes, WireMock, containers): 55 / 9 / 14; 77 files renamed, file and class. - Gradle tasks `unitTest` (UnitTest + RestTest, 16 s test time) and `integrationTest` (40.5 s); `test` and CI unchanged. - `TestNamingConventionUnitTest` fails for a spec without a suffix. - AGENTS.md and the writing-tests skill describe the convention. Found on the way: PIT's timeouts on Werkator came from its 4 s limit, not from the integration tests (323 → 2 timeouts at 20 s); that goes into the next PR together with PIT and werkcrappit. CI on werkator.javagil.de: green (141 s). PR-doc: `docs/prs/2026-10-01-PR#91-separate-unit-and-integration-tests.md` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 1 commit 2026-10-01 21:54:13 +02:00
Every spec now says by its suffix what it needs: *UnitTest (no Spring,
no real git or process), *RestTest (a @WebMvcTest slice) or
*IntegrationTest (full context, real git, processes, WireMock,
containers). unitTest runs the cheap half (16 s of test time),
integrationTest the expensive one (40.5 s); test still runs all.
TestNamingConventionUnitTest fails for a spec without a suffix. The
groundwork for mutation testing, which must run on the cheap half.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi merged commit a4c0e52265 into main 2026-10-02 07:16:30 +02:00
mi deleted branch separate-unit-and-integration-tests 2026-10-02 07:16:30 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#91