Thursday, August 8, 2013

TDD vs BDD - Competitors or Companions


Agile-BDD approach/practice can be introduced without affecting the current TDD Setup. Current TDD can still be there covering from Unit towards Integration testing and BDD can take space from other end i.e.System and towards integration.

UnitTests ---- IntegrationTests ---- SystemTests(Specification)  
TDDà                                                   ßBDD
Imperative                                          Declarative
How                                                       What

One of the pillars of Agile-BDD practice is precise , comprehensible, live  and usable(development/Testing) documentation(specifications) by and for all stakeholders to speed up communication and collaboration. Agile-BDD is more of practice rather than tools. Even keeping updated stories in excel format at shared location can help establishing good practices of Agile-BDD.


Cucumber-jvm and JBehave are front-runners in BDD arena having their own pros and cons.
A good comparison between these two are available @
In short, JBehave is slightly better in terms of automation capabilities, But cucumber-jvm’s gherkin is more suitable for non-technical users(BAs, owners)

Cucumber-jvm

  • Core of tool is gherkin engine – to one end of which Junit is attached and other end of which, any test tool/library can be attached
  •  Picking proper Test tool/libraries and writing glue code is Developer/Automation QA ‘s Headache.
  • Gherkin hides this complexity from normal users (BA), but still allows Communication and Collaboration on ideas.

Few usefull Links