Sunday, May 25, 2014

Behavior Driven Development, BDD for Java


BDD - Behavior Driver Development is an effort to meet the problems faced in Software development described by Eric Evans in his book Domain Driven Design [Eva03]



A project faces serious problems when its language is fractured. Domain experts use their jargon while technical team members have their own language tuned for discussing the domain in terms of design... Across this linguistic divide, the domain experts vaguely describe what they want. Developers, struggling to under- stand a domain new to them, vaguely understand.” 

To avoid any misunderstanding between the domain experts and developer there is a need of a language that can be understood by everyone involved in the project to reduce any misunderstanding.
Gherkin is a such language.

Stateless
Each scenario must be able to be executed independencely of any other scenarios. This is bad practice genereally to have any dependencies to other scenarios. Asume always that the system is in a blank state, hence stateless. In "Given" you can set up all the state you need for the particular state.

The scenario should not contain technical details how to retrive values for example, but what
the system in a given state expected to do things.





Available Behavior Driven Design Framework for Java:

Cucumber-jvm
Spock
JBehave


Link Resources :
Java based bdd with Cucumber
Business Readable DSL by Martin Fowler


No comments:

Post a Comment