Ask the Expert

What is the difference between a user story and use case in software testing?

What's the difference between a user story and a use case?

    Requires Free Membership to View

Both "user stories" and "use cases" are terms used in gathering requirements from customers in a software development project, but there are some major differences, most notably in the level of detail of each. Use cases are much more detailed describing system requirements from the point of view of a user. User stories are short and briefly state the type of user, the feature needed, and the benefit.

Use cases became a popular way in the 1990's of documenting requirements for object-oriented systems. Use cases describe the interaction between one or more "actors" with the system. Actors may be end users, administrators, or any other type of role that will use the system. Actors may also be other systems or devices that interact with the system. The use case includes a series of events described from the point of view of the actor. Scenarios can then be generated from use cases that can be used for acceptance testing. Use cases can be specified using a visual modeling technique called Unified Modeling Language (UML).

User stories are used in agile methodologies to gather short descriptions of customer requirements. User stories typically follow a format of:

    As a [role-based description of user] I want to [short description of feature] So that [benefit is gained]

These short user stories are defined by the business or product owner and are purposely left without a lot of detail so that the detailed requirements can remain relatively flexible. Each user story should have at least one accompanying acceptance test that will serve to define acceptance criteria.

So which should you use? It would depend on the software development methodology your organization is using, the complexity of the project and the amount of documentation that is needed. Agile methodologies stress communication over documentation and typically use user stories over use cases. However use cases come in many forms and may be needed to describe a complex system requirement. Consider the audience for your requirements documentation and what they are comfortable with. Are the business owners comfortable with user stories, knowing that the development teams will allow them opportunity for input throughout the development lifecycle? If so, user stories may be right for the team. However, if the organization is operating in a more traditional manner, they may want to iron out all the details of requirements through use cases before beginning development.

This was first published in April 2010

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: