|Software development process|
|Paradigms and models|
|Methodologies and frameworks|
|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.
|This article or section may have been copied and pasted from http://guide.agilealliance.org/guide/user-stories.html ( · ), possibly in violation of Wikipedia's copyright policy. Please remedy this by editing this article to remove any non-free copyrighted content and attributing free content correctly, or flagging the content for deletion. Please be sure that the supposed source of the copyright violation is not itself a Wikipedia mirror. (June 2015)|
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.
- 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.), 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.
A team at Connextra developed the traditional user-story template in 2001:
- "As a <role>, I want <goal/desire> so that <benefit>"
- "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:
- "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>."
- "As a <role>, I can <action with system> so that <external benefit>"
Search for customers
- As a user, I want to search for my customers by their first and last names.
- As a non-administrative user, I want to modify my own schedules but not the schedules of other users.
- 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.
- As a user, I want to start an application with the last edit.
- 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.
- Upon closing the application, the user is prompted to save (when ANYTHING has changed in data since the last save!).
- 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.
- 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.
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.
|This section does not cite any references (sources). (April 2014)|
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 of user stories include:
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.
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.
A story map 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) as Mike Cohn describes them, and other times correspond to "themes" (collections of related user stories) 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" and below that represents increasing sophistication.[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”. 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|
- Acceptance testing
- Agile software development
- Extreme Programming
- INVEST mnemonic
- Kanban board
- Use case
- "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.
- "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.
- 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/