# Behavior-Driven Development ![[Behavior-Driven Development - Wikipedia#^qjppne]] It is closely related to Consumer-Based Testing and Consumer-Driven Contracts. It can be said that it is a **methodology that dictates that consumers of a module should drive producer behavior through executable specifications**. It's comparable to [[Test-Driven Development]], and the two often go hand-in-hand. The difference is who writes the tests and when. **With TDD, module developers write module tests while writing the module's code, but with BDD consumers of a module write tests with their expectations**. If the consumers and developers are actually the same people, the difference is harder to spot but it is still there: in **BDD tests are written in the specification and in TDD during the implementation phase**. It is often called Outside-In TDD because you start from the outside and test your way in. One popular way of writing tests in BDD is using the [[Gherkin]] language.