Agile Mumbai 2008

BDD using Plain Old JUnit - Proposal  

Behaviour Driven Development using Plain Old JUnit

It's easy to write software. It's harder to write software that's simple, elegant, working and important. BDD's vocabulary helps to drive conversation, avoid ambiguity, eliminate waste, make estimates more accurate, clarify design and produce software that matters.

BDD encourages the use of English and domain vocabulary to focus development on the benefit that the code delivers, using plain examples to illustrate that benefit. The language of those examples is then carried through into the code. We show how to use JUnit as a BDD test harness, allowing the examples to live and evolve alongside the code.


Participants will
  • see how JUnit can be used to create system-level scenarios and unit-level examples, with extended classes used to make the examples more readable and maintainable
  • explore how the words "should" and "ensureThat" can help drive out unit-level behaviour and appropriate responsibility
  • see how BDD's outside-in helps developers adhere to YAGNI and concentrate on the business value each element of code provides
  • understand how to merge good design practices with BDD.

This workshop features

  • A brief introduction to BDD from a dev perspective
  • An introduction to the existing code base and the Tyburn swing harness
  • Live development of a system from the outside-in
  • The build file will zip up the code for anyone to continue on their own or in pairs.

Who should attend

This session is suitable for developers or anyone of a technical bent who can read Java (by the nature of BDD, examples and associated code tend to be quite legible).

About Elizabeth Keogh

Liz Keogh works for Thoughtworks as an Agile developer, mentor, team-leader and haiku poet. She has been the lead developer on JBehave since 2005 and is responsible for the example project used to drive development of the Story framework. She is experienced in using BDD techniques on real-world projects and has taught BDD at various venues including OOPSLA.

History of the tutorial

This tutorial was presented at the OOPSLA 2007 conference. More details


2005-2017 Copyright © Agile Software Community of India
Website designed and hosted by Agile FAQs