Test Driven Development (TDD)
TDD is a development technique where we start by writing a test case and see it fails because the specified functionality doesn't exist, then writing simple code that can make the test pass, then refactoring it.
Behavior Driven Development (BDD)
BDD
is Behavior Driven Development. This means creating an executable
specification that fails because the feature doesn't exist, then writing
the simplest code that can make the spec pass. You repeat this until a
release candidate is ready to ship.
It is important to keep BDD distinct from TDD. These two practices are equally important but address different concerns and should be complementary in best development practices. BDD is concerned primarily with the specification of the behavior of the system under test as a whole, thus is particularly suited for acceptance and regression testing. TDD is concerned primarily with the testing of a component as a unit, in
isolation from other dependencies, which are typically mocked or stubbed. BDD should talk the language of the business domain and not the language of the development technology, which on the other hand is “spoken” by TDD.
No comments: