Agile 101
How to Write Agile User Stories that Deliver Value to the Customer
Learn how to write Agile user stories with real life examples — a skill any Scrum team must have
Before we discuss user stories, let’s clarify what user stories are?
“a piece of functionality that is of value to the customer.”
As an [ACTOR] I want to [ACTION] for the benefit of [STAKE] / so that I [STAKE — reason/benefit]
Description of the user story: the context, what is the business logic, more information about the value given to the customer. Any information you think will be useful to the Development Team
Acceptance Criteria of the agile user story :
GIVEN [SCENARIO]
WHEN [ACTION]
THEN [EXPECTED RESULTS]
What is the scenario for a user story?
Think of it as a user story like you are telling a real story to a child. When you are introducing the story, you are mentioning the circumstances of the story, the landscape, the time when it happens. Imagine you are on the stage and you look at a play before the actors start to act you see the decorations.
Or if plays aren’t your thing, think about the latest movie you’ve seen. There is a clear mise-en-scene. That’s your user story scenario in Agile.
What is action for a user story?
Ones the stage is open, the actors start to play. The actors say replicas, perform actions. That’s what you will describe: what are the activities that your actors are doing on the scene.
What are the expected results for a user story context?
How many times have you watched a movie or a play and expected the film to go on a certain way, you imagined the end. In Agile, the Product Owner has ownership of the product features. Product Owner is the one who must write the story of the plan. Think about the Product Owner as the scenarist, and you want the actors to play your creation, not to be free.
Enough of theory, let’s take practical examples of writing user stories.
I’ll take a few user stories from the CooLab product backlog. CooLab is an application which connects passionate professional cooks with passional amateur cooks that love to cook for their friends and families.
We use a few characters to represent better our persona.
- The Professional Cook — Oscar is the one who wants to share his/her recipes with the entire world
Example number 1:
As a cook (Oscar), I want to upload a small image to my recipes
Description: Oscar is taking the pictures with his smartphone immediately after he’s cooked a recipe.
Acceptance Criteria Number 1
GIVEN I want to upload the picture of my recipe
WHEN I select the picture
THEN it uploads it to the application
Acceptance Criteria Number 2
GIVEN I’m choosing the image of my recipe that I want to upload
WHEN the image is more significant than 25 MB
THEN I receive an error message and instructions about the image size and dimensions
Acceptance Criteria Number 3
GIVEN I’m selecting the image of my recipe that I want to upload
WHEN the image is not in an image format (PDF, doc)
THEN I receive an error message and instructions about the image format
Example number 2:
As a cook (Oscar), I want to edit the image I uploaded to my recipes
Description: Oscar likes to add texts on top of his pictures. He thinks that it brings more value and information to his followers.
Acceptance Criteria Number 1
GIVEN I uploaded the image of my recipe
WHEN I open it
THEN I’m able to edit it
Acceptance Criteria Number 2
GIVEN I uploaded multiple photos of my recipe
WHEN I select one image
THEN I can act only on the selected image
Acceptance Criteria Number 3
GIVEN I uploaded various pictures of my recipe
WHEN I select multiple photos
THEN I can work exclusively on the chosen images
Acceptance Criteria Number 4
GIVEN I uploaded numerous pictures of my recipe
WHEN there is no image selected
THEN I CANNOT perform any action
Acceptance Criteria Number 5
GIVEN I want to edit a picture of my recipe
WHEN I click on it
THEN I’m able to add text to it
Technical user stories example
Summary: As an amateur cook (Julia), I should be able to see the recipe images, so that I can decide which recipe to cook
Acceptance Criteria:
GIVEN: I browse for recipes in the app
WHEN: CooLab app hits the [endpoint route] endpoint with a valid request, containing [required request parameters]
THEN: CooLab app should receive a status [code]
AND: In the response, the following information should be returned: [required response parameters]
Tips for writing user stories:
- Do not restate the user story title.
- Write the title shorter if needed, so it is readable
- Name the user, don’t be afraid to add names
- don’t write too many details; you have a full backlog to prepare as PO