In the last post Simon looked at the problem of expressing a user need using natural language. He will now continue with part two, the sollution.
User Stories using a structured technique
A technique that has proven to be very useful in reducing errors is patterns. One of the simplest way of expressing a user need is in a User Story, the structure of each story is often based on a pattern as follows:
As a … [stakeholder role] …I want to … [perform an action / record some information] … [With some frequency and/or quality characteristic] … So that … [description of value or benefit is achieved].
As a library_user, I want to search for books by title, with speed and ease-of-use, so that I can find all books with similar titles.
Effective natural language user stories/requirements generally consist of four basic structural elements :- entities, actions, events, and conditions. These elements can be used or modified by various cases such as the following:
- Owner. • Actor. • Target. • Constraint.
- Owned. • Action. • Object. • Trigger.
Using these concepts, we can re-state the user story template like this:
As a [Actor or Owner – who/what does the action]
I shall [Action – what happens e.g. store, update, send data]
for; [Object – what is acted upon]
on the [Target or Owned – where the output is sent ; recipient or end state]
with [Performance – frequency and/or quality characteristic]
when [Trigger – causes of action; data receipt/user interaction]
unless / even if [Constraint – business rule or limiting factor]
So that [Rationale – description of value or benefit is achieved].
In the example, ‘library_user’ is the actor, ‘search’ is an action, ‘books in the catalogue’ are the object, the ‘computer screen’ is the target, the performance requirements are ’with speed and ease of use’, the ‘provision of the book title’ is the trigger, ‘incompleteness’ is the constraint / qualifier and ‘finding books with similar titles’ is the value achieved. The user story becomes:-
As a library_user I want to search for books in the library catalogue on the computer screen with speed and ease-of-use when I provide a book title even if the book title is incomplete so that I can find all books with similar titles.
is recommended but there are other orders that are popular, for example Use Case descriptions often use the order:
I provide a book title and begin a search for books in the library catalogue on the computer screen even if the book title is incomplete.
Benefits with patterns
Many user stories are more complicated than this example and no one single order can suffice but without including these elements the possibility for misunderstanding is significantly increased.
Another benefit of this template is that it enables an estimate of functional size to be made.
Standardized structured user story expression enables comparisons across time, across teams, across projects, and across organisations. Developers, product owners, and their customers thus have a common way of communicating so that end user value can be delivered in an effective way.
 “Writing Effective Natural Language Requirements Specifications” by William M. Wilson
Previous post in this series:
This was the final chapter on this blog on how to improve User Stories by applying patterns to capture all relevant information. Next time we will look further into patterns.