Skip to content
zaphod42 edited this page Nov 25, 2010 · 6 revisions

Behaviour-Driven Development

Behaviour-Driven Development (BDD) helps developers and customers collaborate on specifying systems, by concentrating on finding a common language to describe the software. There are good introductions to BDD on Wikipedia and on the BddWiki.

Narrative gives the developer a grammar to structure an acceptance test by splitting it into the steps of Given, When and Then. The test can then be expressed by creating the following elements from the Narrative vocabulary:

  • Actors: a type of user, e.g. sysadmin, author, supervisor
  • Actions: a task or operation performed by a user; e.g. 'load the file', 'click the button', 'follow the link'
  • Extractors: a way of pulling data out of the system under test
  • Matchers: a Hamcrest Matcher that is used to check the data pulled out by the Extractor
Clone this wiki locally