Submit to Reddit      

<< Table of Contents >>
Previous << Understand Technical Tool Constraints

The Behaviour Specification Handbook

Effective Behaviour Specification Steps

Single When

A single "When" statement helps both the reader and tester to focus on the specific, single-purpose behaviour under specification.

If you feel tempted to have an "And" or "But" step that immediately follows the "When" step, then consider moving some of that behaviour up into the "Given" section. Part of what you are trying to specify is likely to be more closely related to the initial conditions that are required to be in place to manifest the behaviour, rather than the specific action that triggers the behaviour.

On the other hand, in the case of specifying something that happens in parallel or concurrently, it might be perfectly valid to have an "And" or "But" step after "When".

If you are tempted to have a step that contains the word or, then consider whether the Behaviour Specification should be split into two separate Behaviour Specifications that each are better focused on having a single purpose, or whether a table is appropriate.

"Given" and "Then" steps with multiple "And" or "But" steps are perfectly fine and common – just ensure it makes sense and is appropriate.

Next >> Guidelines For Examples and Data Tables