Java Testing Strategy

Choosing which test level earns its cost for a given change: what a unit, integration, contract or end-to-end test can and cannot prove, pushing each test to the narrowest scope where the risk is actually real, what every mocked boundary obliges you to verify elsewhere, and coverage as a diagnostic rather than a target. Use when deciding where to test a change, when a suite is slow or nobody trusts it, when a bug escaped a green suite, when mocks make a test pass while production fails, when a coverage gate is proposed, or when a fix needs a regression test. Does not cover how an individual test is written (java-test-design), doubles and Mockito (java-test-doubles), the red-green-refactor loop (tdd), concurrency (concurrency-testing), distributed behaviour (distributed-systems-testing), architecture rules (architecture-testing), load and benchmarks (load-testing, jmh-microbenchmarks), or getting untestable legacy code into a harness (java-legacy-code-testing).

robsonkades ca79263 4 files · 22.2 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/java-testing-strategy commit ca79263440

Frequently asked questions

npx skillmds@latest add robsonkades/java-testing-strategy