liveBook · Manning

Test-driven development

As explained in Django in Action

Test-driven development is a software development approach in which tests are written before the implementation they verify.

Test-driven development (TDD) writes tests before implementation. First decide a function’s interface, then test it, implement it, and finish when its tests pass. section 8.1.1

A practical TDD loop is:

Figure 8.1 Hierarchy of testing categories
figure

Compare unit, integration, behavioral, and UI tests by size, speed, and expected testing frequency. section 8.1.1

How Django in Action covers it

How deep it goes
Defines the test-first loop and completion rule, but does not provide implementation code or detailed testing procedures.
Examples
Uses function interfaces, unit tests, integration tests, behavioral tests, and UI tests as its concrete artifacts.
What you can do after
Apply TDD by writing a function’s tests first and implementing until those tests pass.
How it connects
Connects TDD with automated testing, unit tests, integration tests, behavioral testing, UI testing, and behavior-driven development.

Also explained in

Compare how 15 books explain test-driven development →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Django in Action. The section links point to the parts of the book it draws on.