Monday, August 10, 2009
BDD != functional testing
Why did Behavior Driven Development morph into "functional testing", somehow separate from Test Driven Development? That was certainly not Dan North's intent when he devised BDD. Ironically, he came up with it as a response to people's misconception of TDD as being about testing. He thought that creating a 'new' way of doing things ("new" in the window dressing sense) with precise language would put the emphasis on behavior rather than testing. But behavior doesn't mean functional testing. You can test the behavior of a single method of a single class using BDD and that's as narrowly scoped, white-box, unit test as you can get. If you express it using the BDD ubiquitous language, it's BDD (whether through tooling, or a Domain Specific Language or simply using Given/When/Then naming conventions within your unit test suite).