Narrative

A BDD story consists of one narrative followed by at least one scenario. A narrative is only informative, and its main purpose is to provide just enough information that can serve as a beginning of communication between everyone involved (testers, business representatives, developers, analysts, and so on). It is a short and simple description of a feature, told from the perspective of a person who requires it.

The goal of a narrative is to answer three basic questions:

  1. In order to: What is the benefit or value of the feature that should be built?
  2. As a: Who needs the feature that was requested?
  3. I want to: What is the feature or goal that should be developed?

Once we have those questions answered, we can start defining what we think ...

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.