|
Use Cases or User Stories?
In 1992 Ivar Jacobson introduced a new requirements technique known as use cases. Within 10 years another technique - user stories - gained mind-share. Then the debate began: Which is better? Which provides more value? This month I want to explore both practices. User Stories A user story is a simple, and invariably small, statement of functionality that provides value to an end-user. Here are some user stories from a Vehicle Rental system:
The user story format is very sparse: "As a <user>, I can <identify the value to be obtained> ". The simplicity of this structure is often an obstacle for those who assume the user story is a complete specification of a requirement. It is not. The user story is:
Use Cases A use case is different. The IBM/Rational Unified Process (RUP) defines a use case as "A sequence of actions a system performs, that provide observable value to a particular actor", where actor in this definition represents a user. The goal of a system-level use case is to describe the interactions that take place between the user and the system as the system meets the user's goal: for example, completing a vehicle reservation, or exchanging a vehicle. Specifically, a use case documents a process consisting of these interactions. Here is an example use case from the Vehicle Rental system (showing only the "happy path" where nothing goes wrong): Use Case: Reserve a Vehicle
Use Cases, or User Stories? We can draw some interesting conclusions just from these simple examples. First, we see that some user stories could expand to complete use cases (complex processes). The user stories
are both represented in more precision and complexity in the use case above. But the user stories allow us to talk about "reserving a vehicle" without having to carry around all of the use case complexity. Second, we see that some user stories are appropriately steps of a larger, encompassing process described by a use case. These user stories:
are steps 2 and 7, respectively, in the use case above. Third, while the user story is a simple "shorthand" for value the end user wants, the use case describes the process that provides this value for the end user. Fourth, use cases provide an immediate context for specification of the system behavior when some obstacle or exception is encountered. Here are two exceptions that could occur at step 3 and step 5, respectively, of the use case: 3a. No matching vehicles 3a.1 System informs customer no vehicles found matching the location and dates provided by
customer. 5a. Customer does not provide Frequent Renter number 5a.1 System prompts for required customer information (e.g., name, address, birth date, license
number, license state, etc.). In my experience, user stories do not readily create the process context that joins these exceptions with the "happy path" in the single, integrated format that a use case provides. In contrast, the user story's brevity and purposeful lack of precision forces us to explore with our end users the actual requirements surrounding the goal of the user story. The issue is not "either/or": either use cases or user stories. Rather, we should take a view of "both/and": both use cases and user stories provide a more complete view of the end user goals our software must achieve. Have a productive month, Gary K. Evans |
Subscribe to our newsletter! Send an email to You will find all prior About Evanetics Evanetics provides on-site consulting, training, and assessments for teams and management in Business Analysis, Object-Oriented Modeling with UML, Project Definition, Iterative process, RUP, Agile principles and practices. Phone: 803-781-7628
Evanetics is an Endorsed Education Provider (EEP) for the International Institute of Business Analysis Rare Praise I was at a major retailer in Texas a couple weeks ago, training their IT people in Object-Oriented Design. When I teach, in the very first hour, I always make a list on a flipchart of each student's expectations for the course: What do you want out of this class? As I teach I use the printed Student Manual as "sheet music", and I improvise and add to the course material based on these student expectations. At the end of each course I review the list I made, and ask each student if I met, or exceeded, their goal. When I got to one student in my review of the expectations, I was a bit concerned. She was a very capable database person, and had expressed open skepticism about this Object-Oriented stuff. I read back what she had said she wanted to get out of the course, and asked her if she had obtained value from the course. Her reply came in an easy East-Texas drawl, saying, "I'm as happy as a pig in sunshine!" Everyone in the room laughed, and I told her I had never had a response like that before. But I took her acknowledgement as rare praise, and I think I am going to recall this every time I think about whether I am satisfying my clients' needs. We should all strive to make our customers, and our employers, as happy as a pig in sunshine. Role of QA How would your QA people describe their role in your organization? This is one of the first questions I ask on my consulting projects because I am puzzled why so many QA groups have difficulty articulating their charter in a software organization. The most frequent answer is: We are testers, and we make sure the software does what it is supposed to do. I am always wary of this answer because the role of testing is to find defects, not show the software works. Another possible answer is: We represent the first Customer. We use the software, the installation media, the end-user documentation or Help functions, and the Help Desk. I like this one because it identifies QA as a gatekeeper, assuring few or no surprises when the product reaches the real customer. Another answer: We assure quality - that's what Quality Assurance means. We don't emphasize testing as much as we work with the developers to improve the quality of what they write. This is a disturbing response. It places QA in a qualitative role, rather than a quantitative one. These QA groups are hard-pressed to demonstrate they are actually improving quality. |
|
Published by: Evanetics, Inc.13 Stonebriar Road Columbia, SC 29212 803-781-7628 Copyright (C) 2009 Evanetics, Inc. All rights reserved. www.evanetics.com |
|