Classic Dilemma
User Stories vs Use Cases! Which one to use? Which one to use when? Which one is better? Which one is more suited for my project? What if I choose one method over the other?
As a Business Analyst you may have faced these questions during your career. Sometimes the answer is very clear and the other times there may not be a definitive answer. You must take a best guess and move forward. Before discussing the answers, first let’s review the concepts.
What is Use Case?
Use case represents requirement in the form of user interactions with the system. Use case is always written with a specific user goal in mind. Each use case must contain an actor and verb. For example, ‘online buyer’ is an actor and ‘add item to cart’ is a verb.
A use case diagram represents the scope of all the features of the solution. It follows Unified Modelling Language™ notation. Use case diagram comprises of several use cases that make the system altogether.
What is User Story?
User story is a business analysis artifact that is also user or persona driven. It describes the business need in the form of an ability user (or system) wants in the solution. It also must state why the ability is required and what the benefits of that ability are. It does not have any mandatory format though.
User story is part of the (product/project) backlog. The backlog in turn contains user stories/tasks (requirements) in a linear fashion. Backlog is usually prioritized from high to low, additionally with a ranking when priorities are the same. When it is prioritized by business value of the tasks/stories in it, it is called managed backlog. In many projects, user stories are also represented visually as a user story map, which is a structured visualization of a backlog. User story map is a map of user stories that are transposed from a linear backlog, onto a visual working board.
Each of this concept is a detailed topic in itself. For the context of this article, I will limit it only at the introductory level. Let's now look into differences and similarities between user stories and use cases.
Differences between Use Stories and Use Cases
1. Formal vs Informal:
Use cases are somewhat formal in their representation. The construct has specific elements such as primary and secondary users, per-condition, post condition, main alternate and exception flows etc.
User stories are informal in nature. Business analysts facilitate writing of it collaboratively. User stories are written in a natural language. Agile practices suggest a user story has persona, ability, benefits and acceptance criteria stated.
2. Waterfall vs Agile:
Use cases are generally used in projects that follow waterfall methodology. They are used when the requirements are quite clear thus enabling design, development and testing. Whereas user stories are tied to the agile world of product and projects. They are most suited when the requirements are more changing. They are used to define requirements iteratively.
3. User and systems interactions vs end-user driven:
User cases emphasize more of actor and its interactions with the systems and their inter-relations and dependencies. Whereas user stories are end-user driven and are used to agree on what users need and how the feature will benefit the user. The UX and UI and interactions are later developed keeping those needs in mind.
4. Detailed level vs any level:
In case of user stories, the requirements are iteratively defined and are defined at level 1,2,3 etc until there is clarity to the requirement. Whereas for use cases, there is no such level. Use cases are already at the detail most level.
5. Heavy emphasis on traceability vs heavy emphasis on acceptability and on testing:
Use cases put heavy emphasis on structure and also on traceability from the business requirements to among other use cases. Whereas user stories put lot of emphasis on what and how the testing will occur, what will define the acceptance of a given user story.
Similarities between Use Stories and Use Cases
1. Both represent ways to state requirements:
Well, this may sound trivial but the point is, both of these are very useful and proven ways to capture requirements. Both of these are a great requirement analysis and documentation tool for a business analyst. There is no such thing as one weighs more over the other. Just that each one is more useful in certain situations.
2. Both enable stakeholders and BAs to ask questions
Both enable teams to ask questions in a certain direction and assist BAs to move towards clarity. The constructs or template elements of a use case or a user story are simple cues to enable business analyst with asking specific questions to the stakeholders.
Questions or elicitation activities lead to further information and you will get further insight into stakeholders’ needs. Hence both use cases and user stories are helpful in discovering actors, verbs, steps, outcomes etc.
3. Both are verb or action oriented:
User stories and use cases are action oriented. They represent steps or an active voice and forces or enables business analysts to capture user interactions and system responses.
4. Both do have user focus in mind:
Last but not the least, user stories may seem to be more user focussed. However, both use cases as well as user stories have their own place in business analysis work. Both of these do put user focus in mind.
Comparative Examples
Below are simplified examples of the same requirement ‘booking a movie ticket online’ using Use Case as well as using User Story format.
Use Case Format
Use Case Name: |
Book a movie ticket |
Use Case ID: |
UC_001 |
Business Req Ref: |
BR_005 |
Primary Actor: |
Customer |
Secondary Actor: |
Payment Gateway |
Pre-condition: |
- |
Trigger: |
Customer comes to the booking platform with the goal of booking a movie ticket in a given city |
Use case description: |
This use case comprises of the flow of steps a customer (end user) takes to search for movies, selecting a movie in a given city and at a given timing and then proceeds to book the ticket. Customer gets ticket confirmation in the end. |
Basic flow: |
1. Customer visits the movie ticket booking platform and enters name of the city
a. System shows current and upcoming movies with their names and timing/theatre information
2. Customer selects specific movie from the list
a. System shows the more information about the selected movie
3. Customer proceeds further to check availability for a selected show timing
a. System shows the seat availability chart for the selected show timing for the specific movie/in a given theatre in the select city
4. Customers selects the seats and proceeds to book
a. System confirms the seat selections and takes the user to make final booking
5. Customer enters payment information
a. System connects with the payment gateway and confirms the transaction
b. System sends customer booking conformation details via email/registered phone.
|
Alternate flows: |
1. Customer enters payment information that is invalid
a. System notifies the user of this and redirects him/her to provide payment information once again
|
Exception flows: |
|
UI References: |
UI_Mockup_Ref1
UI_Mockup_Ref2
UI_Mockup_Ref3 |
User Story Format
User Story Title:
As a customer I want ability to book a movie ticket that matches my preferences so that I get to quickly and easily book the movie of my choice
User Story Description:
This feature will involve user selecting a specific city, searching for the movie name, selecting a specific timeslot and then completing the order booking formalities.
UI Sketches/UI references:
UI_Mockup_Ref1
UI_Mockup_Ref2
UI_Mockup_Ref3
Acceptance Criteria:
- User navigates to the search movie page
- User selects city
- User enters movie name
- System searches for the matching movies and displays results
- User selects specific movie timing and proceeds to book
- User enters no. of guests and seats
- User provides payment information
- System validates the payment information and confirms the booking
- System sends email/SMS to the user with booking confirmation details
Note:
- This user story can potentially be broken down into more detailed user stories of level 2,3 and for each level2,3 user story (we can call it an atomic user story), we can write acceptance criteria at that level.
- Note that above stated use cases and user stories are for demonstrating the differences and similarities only. Real life requirements will be very unique to the product/platform you are working on. Those requirements will also contain a lot more detailing.
- You can find online many good examples of use case diagram and use cases. Especially on drawing tools’ websites such as Lucidchart are pretty good.
Concluding Note
In a nutshell, there are many differences between use cases and user stories. There are several similarities as well. Both of these techniques can even be combined at times to make the best of both the word. I would like to give a recent analogy from my trip to the Himalayas. Both of these techniques are like two rivers (the river Ganga and Yamuna) that flow through the Himalayan ranges and then they join together to become the river Ganga. Name does not really matter. The river which is deeper gets the name after merger. Each river still emphasizing the collaborative existences in the nature!
Thoughts? Would love to hear your experiences and ideas.
Author: Swati Pitre, CBAP®, is Sr. Business Analyst
Sr. Business Analyst, Consultant and Trainer with 20+ years of industry experience across various domains and geographies. Recognized by clients as a valued member of business and technology teams, with a proven track record of delivering artifacts and solutions of high quality. Recognized by participants as a highly effective and hands-on trainer and coach. Self-starter, process-oriented, and creative with unique problem-solving skills.
Her specialities include Process Improvement, BPM, Predictive Analytics, Product Development, Quality, and Governance. She undertakes various training courses such as CBAP®/CCBA®/ECBA® Prep Courses, Comprehensive BA Job oriented Course, Agile BA Course, and several other customized courses.
She is also a public speaker and has completed Level 3 of Effective Coaching Pathway at Toastmasters International. She is a yoga and fitness enthusiast with varied hobbies include reading, writing, art, travelling and music.
LinkedIn: Swati Pitre, CBAP® | LinkedIn