Skip to content

Testing Tdd Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 50 companion flashcards using spaced repetition.

7 chapters · 50 cards · Updated

Chapters

  1. 1Test Types and Strategy

    Software testing is organized around three principal levels of scope, each targeting different parts of the system. A unit test verifies the behavior of a single, isolated piece of...

  2. 2TDD and BDD

    Test-Driven Development, or TDD, is a development practice in which tests are written before production code. The cycle begins with Red, writing a failing test that describes the d...

  3. 3Test Doubles

    Tests often need to replace real dependencies to isolate the code under test. These replacements are called test doubles, a term coined by Gerard Meszaros in xUnit Test Patterns, a...

  4. 4Writing and Structuring Tests

    Well-structured tests follow clear patterns that aid readability and maintenance. The AAA pattern, which stands for Arrange, Act, Assert, divides a test into three phases: Arrange...

  5. 5Test Infrastructure and Frameworks

    Behind every robust test suite lies infrastructure that prepares and cleans up the environment. Test fixtures provide a fixed, known starting state by supplying predefined data, ob...

  6. 6Measuring Test Quality

    Coverage metrics attempt to quantify how thoroughly a test suite exercises the codebase. Test coverage is the umbrella term, commonly broken down into line coverage, which measures...

  7. 7Specialized Testing and CI/CD

    Beyond the unit/integration/E2E tiers, several specialized testing strategies target specific risks. Regression testing re-runs existing suites after changes to catch unintended si...

← Back to the Testing Tdd deck