The Structure of User Stories

Do your User Stories have a happy endingUser stories are a without a doubt a great tool for expressing stakeholder requirements on an IT project. However, not all user stories are created equal. In particular, there is room for debate regarding the “best practice” structure for a user story.

A couple of schools of thought are:

 

“As a <role the author represents>, I/we can <do or have something> <with these qualities> to <achieve my business goal or objective>

versus

“To <achieve a business goal or objective>, <roles> can <do or have something> <with these qualities>”.

What Is the Difference?

Whereas the first version focuses on the role, the second focuses on the goal. Like the “Chicken or the egg” question, we now have the “Role versus the goal” discussion.

As a business analysis instructor, I have taught thousands of students the “proper” structure of user stories derived from the original Connextra team recommendations (and modified to allow for quality parameters):

Example: As a website visitor (role), I can view all courses (do something) I need to qualify (quality requirement) for the CBAP® exam (goal).

I like the recommendation from Chris Matts that the value should come first and propose the following modified “proper” structure:

Example: To qualify for the CBAP® exam, website visitors can view all courses they need.

As a fan of minimal verbiage, I like the brevity and power of expression in this version. In addition, this phrasing ties the user stories directly to the business goals / objectives and completes a simple, 7 step Business Analysis Life Cycle:

  1. In the current situation, there is a business problem or opportunity.
  2. You (anyone wearing the Business Analysis hat) define business goals/objectives that would solve the problem or allow you to seize the opportunity.
  3. To achieve each goal/objective, you identify involved actors/users that create user stories expressing what they need/want <with certain qualities>.
  4. To validate that the actors/users get what they need/want, they define <acceptance criteria> for testing purposes.
  5. Developers do their magic (i.e., develop the solution – or pieces thereof).
  6. Testers (anyone wearing the testing hat) ensure that the delivered components pass the <acceptance criteria> and meet <certain qualities>, thus proving that the user story has been satisfied.
  7. The Happy EndingValidating all user stories that share a common goal/objective ultimately validates the goal/objective and, once you have validated all goals/objectives, you have a successful project completion.

End of story and a happy ending for all involved.