Behavior-driven development: Difference between revisions

Content deleted Content added
No edit summary
More information and clarification of the contex.
Line 1:
{{context}}
 
'''Behavior Driven Development''' (BDD) is a programming technique which emphasizes the specification of the behavior of software at a very fine level of granularity. BDD is a variant of or perhaps a reaction to [[Test driven development]]. It speaks to the weaknesses of thinking only in terms of testing. In TDD you write a test, have it fail, and then have it pass by writing code. In BDD, you think of a specification, subclassin Contexta rathergiven than TestCase,context and write functions beginning with "should". insteadFor ofexample "test"assertNull becomes shouldBeNull.
 
One of the major differences between TDDBDD and BDDTDD is the semantic thinking of the coder. The mindset of TDD is create a failing test, then make it pass, while BDD says, write a specification, then implement the code to the specification. TDDwhile suffersthe frommindset beingof calledTDD is create a testingfailing framework.test, BDDthen statesmake it in terms of specificationspass, which isTDD whatsuffers thefrom TDDbeing peoplecalled intended,a buttesting didn'tframework. sayBDD oremphasizes structurespecifications inand theirbehavior, frameworknot codetesting.
 
BDD encourages behavioral specifications, not verification tests, clear thinking about each behavior, and looking at the specification code as executable documentation. It doesn't rely on testing one class or one method, but on one behavior.
 
The term Behavior Driven Development was coined by Dan North.