Skip to content
douglassquirrel edited this page Nov 27, 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. Dan North's Blog provides a good introduction to BDD.

To use BDD with Narrative, first express your test in natural English using the canonical Given, When, Then grammar. Your test can then be expressed, typically with little or no change to the natural English, by using the following elements from the Narrative vocabulary:

  • Actors represent a type of user, e.g. sysadmin, author, supervisor.
  • Actions are tasks or operations performed by Actors, such as 'load the file', 'click the button', or 'follow the link'.
  • Extractors provide a way of getting at information held by the system under test.
  • Matchers are Hamcrest objects that are used to validate data provided by Extractors.
Clone this wiki locally