django-outside-in-tdd
Installation
SKILL.md
Django Outside-In TDD
Use this skill when a Django feature should be grown from observable user behavior down into views, forms, models, and helpers. Keep the outer test broad enough to prove user value and the inner tests small enough to keep the red/green loop fast.
Source Traceability
Primary source: Harry Percival, Test-Driven Development with Python, 3rd ed. Guidance is transformed and paraphrased from chapters 1-7, chapter 24, and Appendix A, especially the user-story-to-functional-test flow, double-loop TDD, working-state-to-working-state refactoring, and outside-in development.
Workflow
-
Start from the user-visible behavior.
- Write a short user story or acceptance note.
- Choose one functional test only when the behavior crosses browser, routing, template, persistence, or integration boundaries.
-
Run the outer test and make the failure useful.
- Confirm the failure is expected and points to the next missing behavior.
- Improve failure messages before implementation if the failure is vague.