Behavior-driven development (BDD) uses tests to describe requirements-level behavior before implementation. The goal is to decide what the software should do, express that behavior in tests, and treat passing tests as evidence that the work is complete. section 8.1.1
A practical BDD workflow looks like this:
- Define the desired behavior rather than starting with internal function details. section 8.1.1
- Write tests before writing the implementation. section 8.1.1
- Implement until the behavioral tests pass, then regard the function as complete. section 8.1.1
- Run behavioral and UI tests less frequently when they are slower, while using faster unit tests more often. section 8.1.1
BDD resembles test-driven development (TDD), but shifts attention from a function’s interface to observable behavior and requirements. Detailed behavioral and UI testing may require additional tools; the boundary between unit and integration tests can also be fuzzy in Django applications. section 8.1.1
Figure 8.1 Hierarchy of testing categories
Use the testing hierarchy to place behavioral tests alongside unit, integration, and UI tests, balancing coverage against execution speed. section 8.1.1



