Submit to Reddit      
  

<< Table of Contents >>
Previous << Feature Names

The Behaviour Specification Handbook

Behaviour Specifications

What Is A Behaviour Specification Description?

A Behaviour Specification Description (also known in Gherkin as a "Scenario" description) is a one-line, simple, precise summary of an expected behaviour of a software component. I recommend the description be worded in commonly accepted, everyday business language, without specifying internal technical implementation details. Each description must be sufficiently precise so that all the Behaviour Specifications of a given software component can be clearly differentiated.

Example Behaviour Specification Descriptions

As an example, say that there is a User Interface component that invokes a back-end service to perform validation of a postal address. The Behaviour Specification Descriptions of this User Interface component could include:

  • Positive - Should allow a specified postal address to be submitted for validation;
  • Positive - Should transform the submitted address data into a format that is required by the address validation service;
  • Positive - Should invoke the address validation service with the appropriately formatted address data;
  • Negative - Should provide a notification of a technical error when there is an issue communicating with the address validation service;
  • Positive - Should provide a notification of an invalid postal address when the address validation service determines the address is invalid; and
  • Positive - Should provide a notification of a valid postal address when the address validation service determines the address is valid.

The behaviours of this User Interface component explicitly do NOT include anything related to how the back-end service performs the validation. Those types of concerns are only the service's behaviours and are not the concern of this User Interface component.

Please make a note of these example Behaviour Specification Descriptions, as they will be referred to in some of the following sections.


Next Chapter >> The Behaviour Specification Writing Process