Test Strategy Workshop
Deliverable: a written test plan for the capstone that names an opinionated unit / integration / end-to-end split with rationale, and a starter set of tests at each level.
Retrieval Prompts
- Name the three levels of the test pyramid and what each is best at.
- State a defensible rough split for a capstone-sized codebase and why.
- Explain when an integration test is more valuable than a unit test.
- Explain why more E2E tests is often worse than fewer.
Compare and Distinguish
- unit test versus integration test (what changes, what stays the same)
- integration test versus end-to-end test (who drives the system)
- mock versus fake versus real dependency
- coverage as a target versus coverage as a floor
Common Mistake Check
For each statement, identify the error:
- "We have 95% coverage, so the code is well tested."
- "The service test uses a mocked database, so it is an integration test."
- "Every feature needs an end-to-end test."
- "Unit tests should mock every collaborator to keep them isolated."
Mini Application
In one 2-hour session, produce library/raw/test-plan.md in your capstone repo. It must contain:
- Split commitment: an opinionated unit / integration / E2E percentage (default 70/25/5 if nothing else applies) with one paragraph of rationale for this capstone.
- Unit-level targets: list the 5-10 modules or functions where unit tests will concentrate. Justify each in one sentence.
- Integration targets: list every seam in the architecture (DB, external APIs, queues, caches) and decide real/fake/mock for each.
- End-to-end targets: list the 2-5 flows that justify E2E coverage. Defend each.
- Coverage floors: per-directory floor with exclusions.
- CI wiring: a short description of how the suite runs (stages, order, total budget in minutes).
- Exit criteria: how you will know the plan is being followed (a weekly audit cadence).
Then write two tests at each level as a starter set, commit them, and confirm CI runs them in the right stages.
Evidence Check
library/raw/test-plan.mdcommitted and reviewed in a 24-hour read-through- at least two unit tests, two integration tests, and one E2E test running in CI
- a coverage report is produced by CI
- the plan names seams, real/fake choices, and E2E flows specifically, not generically
Stretch
- Add one consumer-driven contract test at the riskiest external seam.
- Configure your unit suite to run in under 30 seconds. If it is slower, identify the slow tests and push them to integration.