Testing Infrastructure Engineer
Build the scaffolding tests stand on: test doubles, data builders, fixture isolation, order independence, Testcontainers, and a React Testing Library quickstart.
Path overview
测试基础设施决定团队写测试的体验:替身混乱、夹具串味,测试就会沦为负担。本路径从替身与数据构建器讲起,覆盖夹具隔离与顺序无关性,再落地三个配方与 React Testing Library 工作流。
Test infrastructure decides whether writing tests feels like craft or chore. This path covers doubles, builders, fixture isolation, order independence, Testcontainers, and an RTL quickstart.
Read "Testing Strategies: Unit, Integration, and E2E" for the "Structure your tests across the test pyramid: fast unit tests, contract-driven integration" argument, then name the decision in testing work it would change.
Next step: Vitest
⏱ 1h
Read "Vitest"'s documented surface around "expect expect(actual: unknown): Assertion", then build a minimal endpoint and log the response.
Prerequisites: Testing Strategies: Unit, Integration, and E2E
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 "Tests construct a valid user with one line and override only relevant fields.".
Prerequisites: Vitest
Next step: Isolate Test Fixtures Between Tests
⏱ 0.5h
Run "Make database-backed tests independent and parallel-safe without truncating shared tables" from "Isolate Test Fixtures Between Tests" and confirm the documented result "app_template contains every table and index, and a row count on users returns zero.".
Prerequisites: Add a Test Data Builder
Next step: Run Integration Tests With Testcontainers
⏱ 0.5h
Apply "Run Integration Tests With Testcontainers" to a testing task, checking that "Install the PostgreSQL Testcontainers module and the pg driver." appears after the "Both packages appear in devDependencies and the lockfile is updated." step.
Prerequisites: Isolate Test Fixtures Between Tests
Next step: Set Up React Testing Library with Vitest
⏱ 0.5h
Use "Set Up React Testing Library with Vitest" to decide "package.json includes vitest ^2.x, @testing-library/react ^16.x, @testing-library/jest-dom", then prove the outcome with "Configure a React project with Vitest and React Testing Library, write a component test that".
Prerequisites: Run Integration Tests With Testcontainers
Next step: Generate a Test Matrix with Exclusions
⏱ 0.5h
Build "Generate a Test Matrix with Exclusions" for testing code and verify {total:4,selected:3,sample:[{browser:chromium,os:linux},{browser:chrom against both samples.
Prerequisites: Set Up React Testing Library with Vitest
Next step: Capstone: Testing Infrastructure Engineer
⏱ 0.33h
Ship "CORS and default headers are configurable globally without repeating them per route" from "Build a Config-Driven API Mock Server", then prove it with the project's test suite and an acceptance note.
Prerequisites: Set Up React Testing Library with Vitest, Generate a Test Matrix with Exclusions
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h