Test-driven development (TDD) structures implementation around a failing test: define behavior from a requirement or acceptance criterion, write the test, implement until it passes, then tidy the code. The cycle belongs to the inner loop of coding, testing, running, and debugging. section 1.2.1 section 2.3.3
Use the workflow to obtain fast feedback while developing a change:
- Translate the requirement or acceptance criteria into an executable test. section 2.3.3
- Run the test so its failure establishes the missing behavior. section 1.2.1
- Implement the smallest change that makes the test pass, then clean up without changing the behavior. section 1.2.1
- Keep the test suite quick and reliable; decide whether external dependencies should be mocked or provided as real or containerized services. section 1.3.4
Validating an appointment endpoint
An integration test creates an appointment with a category, posts it to /appointments, expects a successful response, and verifies that the returned body is an Appointment. Equivalent examples use Go and Java test workflows.






















