Zum Inhalt springen

Behavior Driven Development

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 22. Oktober 2005 um 00:51 Uhr durch KellyCoinGuy (Diskussion | Beiträge). Sie kann sich erheblich von der aktuellen Version unterscheiden.
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Behavior Driven Development 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, subclass Context rather than TestCase, and write functions beginning with "should" instead of "test".

One of the major differences between TDD and BDD 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. TDD suffers from being called a testing framework. BDD states it in terms of specifications, which is what the TDD people intended, but didn't say or structure in their framework code.

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.

http://daveastels.com/files/sdbp2005/BDD%20Intro.pdf http://jbehave.codehaus.org/