Testing & TDD
A TDD path through the test pyramid, doubles, property testing, and CI quality gates.
A comprehensive testing and TDD learning path covering unit tests, integration tests, E2E, mocking, TDD methodology, coverage, and CI integration for building reliable, well-tested software.
Wire "Vitest" into a scratch testing project, following "describe / it describe(name: string, fn: () => void): void", and record one working request/response pair.
Next step: Pytest
⏱ 1h
Read "Pytest"'s documented surface around "@pytest.mark.parametrize @pytest.mark.parametrize(argnames, argvalues)", then build a minimal endpoint and log the response.
Prerequisites: Vitest
Next step: Playwright
⏱ 1h
Stand up "Playwright" for a testing task, confirm "Web-first assertions expect(locator: Locator).toBeVisible(options?: { timeout?: number })" holds, and document one failure you triggered.
Prerequisites: Pytest
Next step: Supertest
⏱ 1h
Wire "Supertest" into a scratch testing project, following ".send .send(body: object | string): Test", and record one working request/response pair.
Prerequisites: Playwright
Next step: MSW
⏱ 1h
- 5
MSW
Read "MSW"'s documented surface around "http http.get(path, resolver): HttpHandler", then build a minimal endpoint and log the response.
Prerequisites: Supertest
Next step: Add a Test Data Builder
⏱ 1h
Execute "Add a Test Data Builder" end to end, then repeat the last step with one parameter changed and compare "Make tests readable and resilient to schema changes by constructing only the data each test".
Prerequisites: MSW
Next step: Add a Performance Budget to CI
⏱ 0.5h
Run "Install a size-checking tool and define budgets for the files that matter." from "Add a Performance Budget to CI" and confirm the documented result "A pull request that exceeds the budget fails the check.".
Prerequisites: Add a Test Data Builder
Next step: Testing Strategies: Unit, Integration, and E2E
⏱ 0.5h
Compare "Snapshot Testing: Use and Abuse, and Property-Based Testing" with "Structure your tests across the test pyramid: fast unit tests, contract-driven integration" in "Testing Strategies: Unit, Integration, and E2E" and state which trade-off you would accept in testing code.
Prerequisites: Add a Performance Budget to CI
Next step: Generate a Test Matrix with Exclusions
⏱ 1h
Solve "Generate a Test Matrix with Exclusions" for testing work: turn JSON object: { dimensions: { [name]: string[] }, excludePairs?: [{ into {total:4,selected:3,sample:[{browser:chromium,os:linux},{browser:chrom and pass both samples.
Prerequisites: Testing Strategies: Unit, Integration, and E2E
Next step: Capstone: Testing & TDD
⏱ 0.33h
Deliver the "Build a Persistent Todo CLI with Node.js and JSON Storage" blueprint with "add writes a task with id, title, optional tags, and created timestamp, then prints the id" working and "list filters by --status and --tag and prints tasks grouped by pending or done" recorded as evidence.
Prerequisites: Testing Strategies: Unit, Integration, and E2E, Generate a Test Matrix with Exclusions
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h