Follow This Template

« Table of Contents »
Previous « Unique Without Their Feature File

The Behaviour Specification Handbook

Effective Behaviour Specification Descriptions

Follow This Template

The complete format for a Behaviour Specification Description that I have found to be most helpful holistically, for the majority of team members is:

1    [Feature-Context]-[TestTypeAcronym]010 - [Primary/Secondary]/[Positive/Negative] - Should [...]

For example:

  • Purchasing-ProcessingOrders-Shopping-ManageShoppingCart-UI-UT010a - Primary/Positive - Should successfully validate [...]
  • Purchasing-ProcessingOrders-Shopping-ManageShoppingCart-UI-UT010b - Primary/Positive - Should provide a notification of a error when an expected error occurs when validating [...]
  • Purchasing-ProcessingOrders-Shopping-ManageShoppingCart-UI-UT010c - Secondary/Negative - Should provide a notification of a general system error when an unexpected error occurs while validating [...]
  • Purchasing-ProcessingOrders-Shopping-ManageShoppingCart-UI-UT020 - Primary/Positive - Should do something else that is not extremely closely related to the 010 behaviours, since this is 020

Different team members, coming from their individual roles and perspectives, can and will debate the value of all of the information that is being included into the Behaviour Specification Descriptions. From some of their differing backgrounds and individual perspectives, they may be correct. However, Behaviour Specifications are about clear communication to all types of team members, not just some roles and individual perspectives. The inclusion of all the above information in each Behaviour Specification Description makes each behaviour more meaningful to a wider range of team members, and makes each Behaviour Specification more self-contained. This makes life easier for all present and unknown future team members — especially when someone needs to reference a specific behaviour outside of the context of the feature file.

This approach provides the benefit of clearer understanding holistically for the entire team, and that has always, in my experience, trumped the small annoyance of the verbosity of the description. Someone invariably will be cursing if the information is not there and they are the poor soul that now has to find a needle in a haystack. For the little amount of discipline required, just do it, or your own slight variation — it will be worthwhile and will save the team from future pain!


Next Chapter » Effective Behaviour Specification Steps