User story
Software development process |
---|
Core activities |
Paradigms and models |
Methodologies and frameworks |
Supporting disciplines |
Tools |
Standards and BOKs |
In software development and product management, a user story is a description consisting of one or more sentences in the everyday or business language of the end user or user of a system that captures what a user does or needs to do as part of his or her job function. User stories are used with agile software development methodologies as the basis for defining the functions a business system must provide, and to facilitate requirements management. It captures the "who", "what" and "why" of a requirement in a simple, concise way, often limited in detail by what can be hand-written on a small paper notecard.
A user story encapsulates the action of one function making it possible for software developers to create a vertical slice of their work.
History
User stories originated with Extreme Programming (XP), whose first written description in 1998 only claimed that customers defined project scope "with user stories, which are like use cases". Rather than offered as a distinct practice, they were described as one of the "game pieces" used in the planning game. However, most of the further literature thrust around all the ways arguing that user stories are "unlike" use cases, in trying to answer in a more practical manner "how requirements are handled" in XP and more generally Agile projects. This drives the emergence, over the years, of a more sophisticated account of user stories.[1]
In 2001, Ron Jeffries proposed the well-known Three C's formula, i.e. Card, Conversation, Confirmation, to capture the components of a user story:[2]
- A Card (or often a Post-it note) is a physical token giving tangible and durable form to what would otherwise only be an abstraction;
- A Conversation is taking place at different time and places during a project between the various stakeholders concerned by the given feature (customers, users, developers, testers, etc.), which is largely verbal but most often supplemented by documentation;
- The Confirmation, the more formal the better, ensures that the objectives the conversation revolved around have been reached finally.
Creating user stories
User stories are written by or for business users or customers as a primary way to influence the functionality of the system being developed. User stories may also be written by developers to express non-functional requirements (security, performance, quality, etc.),[3] though primarily it is the task of a product manager to ensure user stories are captured.
When the time comes for creating user stories, one of the developers gets together with a customer representative, e.g. a product manager (or product owner in Scrum), which has the responsibility for formulating the user stories. The developer may use a series of questions to get the customer representative going, such as asking about the desirability of some particular functionality, but must take care not to dominate the idea-creation process.
As the customer representative conceives a user story, it is written down on a note card (e.g. 3x5 inches or 8x13 cm) with a name and a brief description. If the developer and the customer representative find a user story deficient in some way (too large, complicated, or imprecise), it is rewritten until satisfactory - often using the INVEST guidelines. Commonly, user stories are not to be definite once they have been written down, since requirements tend to change throughout the development lifecycle, which agile processes handle by not carving them in stone upfront.
Format
A team at Connextra developed the traditional user-story template in 2001:[4]
- "As a <role>, I want <goal/desire> so that <benefit>"
Mike Cohn, a well-known author on user stories, regards the "so that" clause as optional:[5]
- "As a <role>, I want <goal/desire>"
Chris Matts suggested that "hunting the value" was the first step in successfully delivering software, and proposed this alternative as part of Feature Injection:[6]
- "In order to <receive benefit> as a <role>, I want <goal/desire>"
Another template based on the Five Ws specifies:
- "As <who> <when> <where>, I <what> because <why>."
A template developed at Capital One in 2004 during their initial adoption of Agile methods focuses on the functionality and specifies:[7]
- "As a <role>, I can <action with system> so that <external benefit>"
Examples
Screening Quiz (Epic Story)
- As the HR manager, I want to create a screening quiz so that I can understand whether I want to send possible recruits to the functional manager.[8]
Quiz Recall
- As a manager, I want to browse my existing quizzes so I can recall what I have in place and figure out if I can just reuse or update an existing quiz for the position I need now.[8]
Limited Backup
- As a user, I can indicate folders not to backup so that my backup drive isn't filled up with things I don't need saved.[9]
Usage
As a central part of many agile development methodologies, such as in XP's planning game, user stories define what has to be built in the software project. User stories are prioritized by the customer (or the product owner in Scrum) to indicate which are most important for the system and will be broken down into tasks and estimated by the developers.
When user stories are about to be implemented, the developers should have the possibility to talk to the customer about it. The short stories may be difficult to interpret, may require some background knowledge or the requirements may have changed since the story was written.
Every user story must at some point have one or more acceptance tests attached, allowing the developer to test when the user story is done and also allowing the customer to validate it. Without a precise formulation of the requirements, prolonged nonconstructive arguments may arise when the product is to be delivered.
Benefits
User stories offer a quick way of handling customer requirements without having to create formalized requirement documents and without performing administrative tasks related to maintaining them. A project will gather user stories in order to respond faster and with less overhead to rapidly changing real-world requirements.
XP and other agile methodologies favor face-to-face communication over comprehensive documentation and quick adaptation to change instead of fixation on the problem. User stories achieve this by:
- extreme brevity: they represent small chunks of business value which a programmer can implement in a period of days to weeks
- allowing a developer and the client representative to discuss requirements throughout the project lifetime
- needing very little maintenance.
- being considered only at the time of use
- allowing the breaking of projects into small increments
- suitability for projects which have volatile or poorly understood requirements: iterations of discovery drive the refinement process
- making it easier to estimate development effort
- maintaining a close customer contact
- requiring close customer contact throughout the project so that the most valued parts of the proposed software system get implemented
Limitations
Limitations of user stories include:
Scale-up problem
User stories written on small physical cards are hard to maintain, and difficult to scale to large projects with plenty of complex requirements.
Vague, informal and incomplete
User story cards are regarded as conversation starters. One of the main limitations of user story is that it is open for many interpretations, since a user story, especially the card text containing scripts which focuses on a user's functional goal, is simple but often vague. It does not state the details of user interactions with the system, while customers may have different understandings about the exact story from the team. As a result, it is hard to only use the user story (card) to act as a formal agreement between stakeholders. That is why it is suggested in Extreme Programming that a customer or end user representative is always a part of the team, so that they can communicate and clarify any doubt through direct face-to-face communication.[10]
A user story is an informal statement of a requirement as long as its correspondence of acceptance testing procedures is lacking. Typically in Extreme Programming before a user story is to be implemented, appropriate acceptance tests or procedures must be written by the customer to ensure by testing the goals of the user story have been fulfilled. Some formalization finally happens when the developer accepts the user story and the acceptance procedures as a work-specific order.
Lack of non-functional requirements
The simplicity of a user story also causes another limitation. It usually has no performance or non-functional requirement details. When dealing with user stories which become the basis of user acceptance tests, often, only functional or business logic will be tested, while performance and non-functional tests (e.g. response time) are prone to be overlooked. To overcome this, developers or testers need to pay attention to specifications such as product quality attributes and system constraints when developing acceptance tests. These additional requirement documents have to be developed and maintained carefully as they will complement user stories.[10]
Story map
A story map[11] is a graphical, two-dimensional product backlog. At the top of the map are big user stories, which are sometimes "epics" (big, coarse-grained user stories)[12] as Mike Cohn describes them, and other times correspond to "themes" (collections of related user stories[13]) or "activities". These grouping units are created by orienting at the user’s workflow or "the order you'd explain the behavior of the system". Vertically, below the epics, the actual story cards are allocated and ordered by priority. The first horizontal row is a "walking skeleton"[14] and below that represents increasing sophistication.[15]
In this way it becomes possible to describe even big systems without losing the big picture.
Comparing with use cases
A use case has been described as “a generalized description of a set of interactions between the system and one or more actors, where an actor is either a user or another system”.[16] While both user stories and use cases serve the purpose to capture user requirements in terms of interactions between the user and the system, there are several differences between them.
User Stories | Use Cases | |
---|---|---|
Similarities |
|
|
Differences |
|
|
Template | As a <type of user>, I want <some goal> so that <some reason>.[9] |
|
Kent Beck, Alistair Cockburn, Martin Fowler and others discussed this topic further on the c2.com wiki (the home of extreme programming).[18]
See also
- Acceptance testing
- Agile software development
- Extreme Programming
- INVEST mnemonic
- Kanban board
- Requirement
- Scrum
- Use case
References
- ↑ "User Stories". Agile Alliance.
- ↑ Ron Jeffries (August 30, 2001). "Essential XP: Card, Conversation, Confirmation".
- ↑ Davies, Rachel. "Non-Functional Requirements: Do User Stories Really Help?". Retrieved 12 May 2011.
- ↑ http://agilecoach.typepad.com/photos/connextra_user_story_2001/connextrastorycard.html
- ↑ http://www.mountaingoatsoftware.com/blog/advantages-of-the-as-a-user-i-want-user-story-template
- ↑ http://antonymarcano.com/blog/2011/03/fi_stories/
- ↑ http://www.agileadvice.com/2014/03/06/referenceinformation/user-stories-and-story-splitting/
- 1 2 Cowan, Alexander. "Your Best Agile User Story". Cowan+. Retrieved 29 April 2016.
- 1 2 Cohn, Mike. "User Stories". Mountain Goat Software. Retrieved 27 April 2016.
- 1 2 "Limitations of user stories". Ferolen.com. April 15, 2008.
- ↑ Patton, Jeff. "The new user story backlog is a map". Retrieved 4 March 2013.
- ↑ Pichler, Roman. "10 Tips for Writing Good User Stories". Retrieved 29 July 2014.
- ↑ User Stories, Epics and Themes
- ↑ Cockburn, Alistair. "Walking Skeleton". Retrieved 4 March 2013.
- ↑ "Story mapping". Agile Alliance. Retrieved 4 March 2013.
- ↑ Advantages of User Stories for Requirements
- ↑ Martin Fowler (18 August 2003). "UseCasesAndStories".
- ↑ "User Story And Use Case Comparison". c2.com.
Further reading
- Daniel H. Steinberg, Daniel W. Palmer, Extreme Software Engineering, Pearson Education, Inc., ISBN 0-13-047381-2.
- Mike Cohn, User Stories Applied, 2004, Addison Wesley, ISBN 0-321-20568-5.
- Mike Cohn, Agile Estimating and Planning, 2006, Prentice Hall, ISBN 0-13-147941-5.
- Business Analyst Times http://www.batimes.com/articles/user-stories-and-use-cases-dont-use-both.html
- Payton Consulting 'How user stories are different from IEEE requirements' http://www.payton-consulting.com/user-stories-different-requirements/