User story

From Infogalactic: the planetary knowledge core
(Redirected from User stories)
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

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

Lua error in package.lua at line 80: module 'strict' not found. 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

Search for customers

As a user, I want to search for my customers by their first and last names.

Modify schedules

As a non-administrative user, I want to modify my own schedules but not the schedules of other users.

Run tests

As a mobile application tester, I want to test my test cases and report results to my management.

Start application with last edit

The application begins by bringing up the last document the user was working with.
Or
As a user, I want to start an application with the last edit.

Close application

As a user closing the application, I want to be prompted to save if I have made any change in my data since the last save.
Or
Upon closing the application, the user is prompted to save (when ANYTHING has changed in data since the last save!).
Or
As a user closing the application, I want to be prompted to save anything that has changed since the last save so that I can preserve useful work and discard erroneous work.

Enter expenses

The consultant will enter expenses on an expense form. The consultant will enter items on the form like expense type, description, amount, and any comments regarding the expense. At any time the consultant can do any of the following options:
(1) When the consultant has finished entering the expense, the consultant will “Submit”. If the expense is under fifty (<50), the expense will go directly to the system for processes.
(2) In the event the consultant has not finished entering the expense, the consultant may want to “Save for later”. The entered data should then be displayed on a list (queue) for the consultant with the status of “Incomplete”.
(3) In the event the consultant decides to clear the data and close the form, the consultant will “Cancel and exit”. The entered data will not be saved anywhere.

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

Lua error in package.lua at line 80: module 'strict' not found.

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.[8]

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.[8]

Story map

File:User Story Map in Action.png
A story map in action

A story map[9] 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)[10] as Mike Cohn describes them, and other times correspond to "themes" (collections of related user stories[11]) 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"[12] and below that represents increasing sophistication.[13][clarification needed]

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”.[14] 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
  • Generally formulated in users' everyday language. They should help the reader understand what the software should accomplish.
  • Must be accompanied by acceptance testing procedures (acceptance criteria) for clarification of behavior where ambiguous.
  • Written in users' everyday business language, to facilitate stakeholder communications.
  • Must be accompanied and verifiable by test cases.
Differences
  • XP stories (and similar things, often called features) break requirements into chunks for planning purposes. Stories are explicitly broken down until they can be estimated as part of XP's release planning process.[15]
  • Provide a small-scale and easy-to-use presentation of information, with little detail, thus remaining open to interpretation, through conversations with on-site customers.
  • Usually written on small note cards.
  • Stories are usually more fine-grained because they have to be entirely buildable within an iteration (one or two weeks for XP).[15]
  • Use cases organize requirements to form a narrative of how users relate to and use a system. Hence they focus on user goals and how interacting with a system satisfies the goals.[15]
  • Use case flows describe sequences of interactions, and may be worded in terms of a formal model. A use case is intended to provide sufficient detail for it to be understood on its own.
  • Usually delivered in a stand-alone document, and visualized by UML diagrams.
  • A small use case may correspond entirely to a story; however a story might be one or more scenarios in a use case, or one or more steps in a use case.[15]

Kent Beck, Alistair Cockburn, Martin Fowler and others discussed this topic further on the c2.com wiki (the home of extreme programming).[16]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. http://agilecoach.typepad.com/photos/connextra_user_story_2001/connextrastorycard.html
  5. http://www.mountaingoatsoftware.com/blog/advantages-of-the-as-a-user-i-want-user-story-template
  6. http://antonymarcano.com/blog/2011/03/fi_stories/
  7. http://www.agileadvice.com/2014/03/06/referenceinformation/user-stories-and-story-splitting/
  8. 8.0 8.1 Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. User Stories, Epics and Themes
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Advantages of User Stories for Requirements
  15. 15.0 15.1 15.2 15.3 Lua error in package.lua at line 80: module 'strict' not found.
  16. Lua error in package.lua at line 80: module 'strict' not found.

Further reading