Principles of BDD
At its core, Behavior-driven development is a specialized version of test-driven development which focuses on behavioral specification of software units.
Test-driven development is a software development methodology which essentially states that for each unit of software, a software developer must:
- define a test set for the unit first;
- then implement the unit;
- finally verify that the implementation of the unit makes the tests succeed.
This definition is rather non-specific in that it allows tests in terms of high-level software requirements, low-level technical details or anything in between. The original developer of BDD (Dan North) came up with the notion of BDD because he was dissatisfied with the lack of any specification within TDD of what should be tested and how. One way of looking at BDD therefore, is that it is a continued development of TDD which makes more specific choices than TDD.
Behavior-driven development specifies that tests of any unit of software should be specified in terms of the desired behavior of the unit. Borrowing from agile software development the "desired behavior" in this case consists of the requirements set by the business — that is, the desired behavior that has business value for whatever entity commissioned the software unit under construction. Within BDD practice, this is referred to as BDD being an "outside-in" activity.
Read more about this topic: Behavior Driven Development
Famous quotes containing the words principles of and/or principles:
“Though the ancients were ignorant of the principles of Christianity there were in them the germs of its spirit.”
—Herman Melville (18191891)
“In child rearing it would unquestionably be easier if a child were to do something because we say so. The authoritarian method does expedite things, but it does not produce independent functioning. If a child has not mastered the underlying principles of human interactions and merely conforms out of coercion or conditioning, he has no tools to use, no resources to apply in the next situation that confronts him.”
—Elaine Heffner (20th century)