What is a user story and how to write one?

What is a user story?

A user story captures the requirements of a system from the perspective of the end user in agile software development.It is written in terms of end user to convey who the user is, what they want to achieve and why they want to achieve it. It is a simple and summarized description of a feature or part of a feature that once accomplished would provide some benefit to the end user.

User stories fill the gap between the high level requirements of a feature and what actually needs to be developed by the engineering team. By defining it in terms of end user, it helps in bringing the design, engineering and quality assurance team on the same page and think from the perspective of the end user and their needs.

Here is a simple template to write a user story:

“As a [type of user], I want [an action or feature], so that [a reason or benefit].”

Lets look at an example of a user story written for a social media app:

“As a registered user, I want to be able to post comments on other users’ posts, so that I can engage in conversations and share my thoughts.”

In this example, the end user is a registered user, the action or feature is the ability to post comments, and the reason or benefit is to engage in conversations and share thoughts.

When writing user stories, it’s important to focus on the user’s needs, keep them concise and specific, and avoid going into implementation details. User stories serve as a basis for communication between the development team and stakeholders, helping to prioritize and plan the work effectively.

What are characteristics of a user story?

An ideal user story must follow INVEST acronym:

  1. Independent: The user story should be self-contained and independent of other stories.
  2. Negotiable: The details and implementation of the user story can be negotiated between the development team and the product owner.
  3. Valuable: The user story should bring value to the end user or customer.
  4. Estimable: The development team should be able to estimate the effort required to complete the user story.
  5. Small: User stories should be small enough to be completed within a single iteration or sprint.
  6. Testable: The user story should have clear acceptance criteria that can be used to verify its completion.

Role of product owner in writing user stories

The product owner plays a crucial role in writing user stories. They are responsible for understanding and representing the needs of the users, customers, and stakeholders throughout the development process. Here are some specific roles and responsibilities of the product owner in writing user stories:

  1. Gathering Requirements:

The product owner works closely with stakeholders, users, and customers to identify their requirements, needs, and expectations. They engage in conversations, conduct interviews, and gather feedback to gain a deep understanding of what the users want.

  1. Defining User Personas:

    User personas represent the different types of users or customers who will be using the product. The product owner helps create these personas by considering demographics, behaviors, goals, and motivations. These personas serve as a reference point when writing user stories.

  2. Prioritizing Features:


    The product owner collaborates with the development team and stakeholders to prioritize features and functionalities. They consider the value, impact, and feasibility of each user story, ensuring that the most important and valuable stories are written and implemented first.

  3. Writing User Stories:

    Based on the gathered requirements and user personas, the product owner takes the lead in writing user stories. They use the “As a [type of user], I want [an action or feature], so that [a reason or benefit]” format to capture the essence of the user’s needs and expectations.

  4. Communicating with the Development Team:

    The product owner/manager acts as a liaison between the development team and the stakeholders. They clarify the user stories, answer questions, and provide additional context to ensure a shared understanding of the requirements. They also work with the team to break down user stories into smaller, actionable tasks.

  5. Defining Acceptance Criteria:

    The product owner collaborates with the development team to define clear acceptance criteria for each user story. These criteria outline the specific conditions and outcomes that must be met for the user story to be considered complete. They help ensure that the development team delivers the desired functionality.

  6. Iterative Refinement:

    Throughout the development process, the product owner continuously reviews and refines user stories based on feedback, changing priorities, and evolving user needs. They incorporate new insights and adjust the user stories to maximize value and meet customer expectations.

Overall, the product owner acts as an advocate for the users, ensuring that their needs and expectations are accurately captured in the user stories. They collaborate with stakeholders and the development team to create a shared vision and guide the development process towards delivering a valuable and successful product.

How to write a user story using Gherkin format?

To write a user story using the Gherkin format, follow these steps:

  1. Start with the Feature:

    Begin the user story by specifying the feature or functionality you are describing. This sets the context for the user story.

  2. Write the Scenario:

    Each user story can have multiple scenarios. Start by writing a scenario that describes a specific situation or condition in which the user interacts with the system. Begin the scenario with the “Scenario” keyword, followed by a descriptive title.

  3. Add Given, When, and Then Steps:

    Within the scenario, use the Given, When, and Then steps to outline the specific actions and expected outcomes. Here’s how to structure these steps:

    • Given: Describe the initial setup or preconditions for the scenario.
    • When: Specify the action or event that the user performs.
    • Then: Define the expected outcome or result of the action.

    Each step should begin with the keywords “Given,” “When,” or “Then” followed by a statement. For example:

    sql
    Given the user is logged into the system
    When the user clicks on the "Add to Cart" button
    Then the item should be added to the shopping cart
  4. Add Additional Scenarios

    : If the user story has multiple scenarios, add them under the same feature. Each scenario should follow the same Given, When, Then format.

  5. Include Example Tables (Optional)

    If your scenario involves multiple data inputs or variations, you can use example tables to provide clear and concise examples. This can be done using the pipe character (|) to separate values within a table. For example:

    sql

    Scenario: Search for a product
    Given the user is on the homepage
    When the user searches for the following products:
    | Product |
    | Phone |
    | Headphones |
    Then the search results should display the products
  6. Repeat for Each User Story:

    Follow the same structure for each user story, describing the features, scenarios, and steps specific to that user story.

By following the Gherkin format, you can create user stories that are not only readable by stakeholders but also serve as executable specifications for automated testing. It promotes collaboration and clarity between the development team and stakeholders, allowing for better understanding and validation of requirements. You can read more about Gherkin format here to get a deeper understanding on how to use this format for user stories.

Mistakes to avoid in user stories

When writing user stories, it’s important to avoid certain mistakes to ensure their effectiveness and clarity. Here are some common mistakes to avoid:

  1. Including Implementation Details:

    User stories should focus on the user’s needs and desired outcomes, rather than prescribing specific implementation details. Avoid getting into technical specifics or solutions within the user story itself.

  2. Writing Vague or Ambiguous Stories:

    User stories should be clear and specific, leaving no room for ambiguity. Avoid using vague language or generalized statements that can lead to different interpretations. Provide enough details for the development team to understand the user’s intent.

  3. Neglecting Acceptance Criteria:

    Acceptance criteria are crucial for defining the boundaries and success criteria of a user story. Neglecting to include acceptance criteria can lead to misunderstandings and challenges during development. Clearly specify the conditions that must be met for the user story to be considered complete.

  4. Overlooking User Value:

    User stories should prioritize the value and benefits to the user. Avoid writing stories that don’t bring significant value or are not aligned with user needs. Focus on the most valuable features and functionalities that address real user problems or enhance their experience.

  5. Forgetting Non-Functional Requirements:

    User stories often emphasize functional requirements, but non-functional requirements (such as performance, security, or scalability) are equally important. Don’t overlook these aspects when writing user stories to ensure a well-rounded understanding of the user’s expectations.

  6. Not Involving the Right Stakeholders:

    User stories require collaboration and input from various stakeholders, including users, customers, and the development team. Failing to involve the right stakeholders can result in incomplete or inaccurate user stories. Engage with all relevant parties to gain a comprehensive understanding of the requirements.

  7. Ignoring User Feedback:

    User stories should be dynamic and subject to refinement based on user feedback. Avoid treating user stories as fixed and unchangeable. Continuously gather feedback and iterate on the user stories to ensure they remain aligned with evolving user needs and priorities.

  8. Overcomplicating or Underestimating Stories:

    User stories should be sized appropriately to ensure they can be completed within a reasonable timeframe. Avoid creating overly complex or large user stories that may be difficult to estimate or complete within a single iteration. Break down large stories into smaller, more manageable pieces.

By avoiding these common mistakes, you can write user stories that are clear, valuable, and aligned with user needs, facilitating effective communication and successful development.

About monica

Monica, has an extensive experience in launching products across various platforms in healthcare, media and ed-tech domain. She loves to share her thoughts on product management based on her experience.

155 thoughts on “What is a user story and how to write one?”

  1. Pingback: Product Discovery
  2. I do consider all of the ideas you’ve offered on your post.
    They’re really convincing and can definitely work.
    Still, the posts are too short for starters. Could you
    please extend them a little from subsequent time?
    Thank you for the post.

  3. It’s interesting to consider how Mantle 3D could help companies react more
    quickly to market demands by shortening the time from concept to production.

    Being able to include complex features into a single tool could simplify the manufacturing process greatly, reducing the need for multiple components.

    It would be interesting to explore how Mantle’s 3D technology
    can help in producing molds for high-performance plastics, especially in sectors like medical
    or aerospace.

  4. Wonderful blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thank you

  5. This is the right webpage for anyone who wants to understand this topic.

    You know so much its almost hard to argue with you (not that I actually would want
    to…HaHa). You certainly put a fresh spin on a subject that’s
    been discussed for years. Excellent stuff, just excellent!

  6. I was recommended this web site by my cousin. I’m not sure
    whether this post is written by him as nobody else know such
    detailed about my difficulty. You are incredible!
    Thanks!

  7. Magnificent beat ! I wish to apprentice whilst you amend
    your website, how could i subscribe for a weblog
    website? The account aided me a applicable deal. I were tiny bit familiar of this
    your broadcast offered brilliant transparent idea

  8. Hey! This is my first comment here so I just wanted
    to give a quick shout out and say I really enjoy reading your blog posts.

    Can you suggest any other blogs/websites/forums that cover the
    same subjects? Many thanks!

  9. Very great post. I just stumbled upon your weblog and wanted to say that I have really
    loved browsing your weblog posts. In any case I will be subscribing to your
    feed and I’m hoping you write once more very soon!

  10. I don’t know whether it’s just me or if perhaps everybody else encountering issues with your website.
    It seems like some of the written text within your posts are running off the screen. Can somebody else please comment and let me know if this
    is happening to them as well? This could be a issue with my
    internet browser because I’ve had this happen previously.
    Kudos

  11. It is in point of fact a great and helpful piece of info.

    I am happy that you simply shared this helpful information with us.
    Please stay us informed like this. Thank you for
    sharing.

  12. Spot on with this write-up, I honestly believe this amazing site needs a lot more attention. I’ll probably be back again to see more, thanks for the advice!

  13. Thanks on your marvelous posting! I actually enjoyed reading it, you might be a great author.
    I will remember to bookmark your blog and will come back later in life.

    I want to encourage continue your great work, have a nice
    weekend!

  14. I loved as much as you’ll receive carried out right here. The sketch is attractive,
    your authored material stylish. nonetheless, you command get bought
    an shakiness over that you wish be delivering the following.

    unwell unquestionably come further formerly again since exactly
    the same nearly a lot often inside case you shield this hike.

  15. May I simply say what a comfort to find somebody that genuinely knows what they’re talking about on the net.
    You definitely understand how to bring a problem to light and make
    it important. A lot more people must read this and
    understand this side of the story. It’s surprising you are not more popular since you definitely possess the gift.

  16. Simply wish to say your article is as astonishing. The clearness to your publish is just great and i can think you’re an expert in this subject.
    Well along with your permission allow me to seize your RSS feed to keep up to date with imminent post.
    Thank you a million and please carry on the enjoyable work.

  17. Do you have a spam problem on this blog; I also am a blogger,
    and I was wondering your situation; we have developed some nice procedures and
    we are looking to swap strategies with other folks, please shoot
    me an e-mail if interested.

  18. I think this is one of the so much significant information for me.
    And i am satisfied reading your article. But want to observation on few general
    things, The web site taste is ideal, the articles is truly excellent : D.
    Just right process, cheers

  19. My brother suggested I might like this blog. He was totally right.
    This post actually made my day. You cann’t imagine simply how much
    time I had spent for this info! Thanks!

  20. Whoa! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the same page layout and design. Superb choice of colors!

  21. Good day! I simply would like to offer you a huge thumbs up for the excellent info
    you have got here on this post. I will be returning to your blog for more soon.

  22. Everything is very open with a very clear clarification of the issues.
    It was truly informative. Your website is extremely helpful.
    Many thanks for sharing!

  23. Have you ever thought about publishing an e-book
    or guest authoring on other websites? I have a blog based on the same ideas you discuss
    and would love to have you share some stories/information. I know my viewers would
    value your work. If you’re even remotely interested, feel free to send me an e-mail.

  24. Hi there, just became alert to your blog
    through Google, and found that it’s truly informative. I am gonna watch out for brussels.
    I’ll appreciate if you continue this in future. Many people will be benefited from your
    writing. Cheers!

  25. I was suggested this website by my cousin. I’m not sure whether
    this post is written by him as no one else know such detailed about my trouble.

    You are incredible! Thanks!

  26. This design is wicked! You most certainly know how to keep
    a reader entertained. Between your wit and your videos, I was almost moved to
    start my own blog (well, almost…HaHa!) Fantastic job.
    I really enjoyed what you had to say, and more
    than that, how you presented it. Too cool!

  27. Superb site you have here but I was wondering if you knew of any forums that cover
    the same topics discussed here? I’d really love to be a part of online community where I can get
    opinions from other experienced individuals that share the same interest.
    If you have any recommendations, please let me know. Many thanks!

  28. A person essentially lend a hand to make critically articles I would
    state. That is the very first time I frequented your web page and so far?

    I amazed with the analysis you made to make this particular post incredible.
    Fantastic process!

  29. Amazing things here. I am very satisfied to look your post.
    Thanks so much and I am having a look forward to contact
    you. Will you please drop me a mail?

  30. My partner and I stumbled over here from a different website and thought I may as well
    check things out. I like what I see so now i am following you.
    Look forward to exploring your web page repeatedly.

  31. I’m impressed, I have to admit. Rarely do I come across a blog
    that’s equally educative and engaging, and without a doubt, you’ve hit the nail on the head.
    The problem is something that not enough men and women are speaking intelligently about.
    I am very happy I came across this in my search for something regarding this.

  32. I blog quite often and I really appreciate your content.
    This article has truly peaked my interest. I will book mark your site and keep checking for new information about once per week.
    I subscribed to your Feed as well.

  33. Hey there, You have done an excellent job. I will certainly digg it and personally recommend to my friends.
    I’m confident they will be benefited from this site.

  34. Hello there! I know this is kinda off topic but I was wondering which blog platform are you using for this site?
    I’m getting fed up of WordPress because I’ve had issues
    with hackers and I’m looking at alternatives for another platform.
    I would be fantastic if you could point me in the direction of a good platform.

  35. Heya i am for the first time here. I found this board and I
    find It really useful & it helped me out much.
    I hope to give something back and aid others like you aided
    me.

  36. Hello! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading
    your articles. Can you recommend any other blogs/websites/forums that deal with the same topics?
    Thanks for your time!

  37. Good day! This is kind of off topic but I need some advice from an established
    blog. Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about creating my own but I’m not
    sure where to start. Do you have any points or suggestions?

    Appreciate it

  38. Unquestionably believe that which you stated. Your favorite reason appeared to be on the internet the
    easiest thing to be aware of. I say to you, I definitely
    get annoyed while people think about worries that they plainly don’t know about.

    You managed to hit the nail upon the top as well as defined out the whole thing without having
    side-effects , people could take a signal.

    Will likely be back to get more. Thanks

  39. What you posted made a lot of sense. However, think about this, suppose
    you were to create a killer headline? I ain’t saying your information isn’t solid., but what if you added a title that makes people desire more?

    I mean What is a user story and how to write one? is a little vanilla.
    You could peek at Yahoo’s front page and see how they
    create news titles to grab viewers interested.

    You might add a video or a picture or two to get readers
    excited about what you’ve got to say. Just my opinion, it might make your blog a little livelier.

  40. I’m not sure where you are getting your info, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for excellent information I was looking for this information for my mission.

  41. Thanks , I’ve just been searching for information approximately this topic for a while and yours is the greatest I’ve discovered till now.
    However, what about the bottom line? Are you certain about the supply?

  42. Hmm is anyone else encountering problems with the images on this blog loading?
    I’m trying to determine if its a problem on my end
    or if it’s the blog. Any feedback would be greatly appreciated.

  43. Hey! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended up losing
    several weeks of hard work due to no back
    up. Do you have any methods to protect against hackers?

  44. Hello would you mind letting me know which web host you’re working with?
    I’ve loaded your blog in 3 completely different web browsers
    and I must say this blog loads a lot quicker then most.
    Can you suggest a good internet hosting provider at a reasonable price?
    Many thanks, I appreciate it!

  45. Hi I am so delighted I found your website, I really found you by
    error, while I was browsing on Aol for something else, Nonetheless I am here now and would just like to say thank you for a marvelous
    post and a all round interesting blog (I also love the theme/design), I
    don’t have time to go through it all at the minute but I have book-marked it and also
    added in your RSS feeds, so when I have time I will be back to read a great deal more, Please
    do keep up the superb job.

  46. Excellent beat ! I wish to apprentice while you amend your site, how can i
    subscribe for a blog web site? The account helped me a acceptable
    deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

  47. The Grand Theft Auto series is known for its extreme
    violence, slapstick humor, drug use, and evgen at some points,torture.

    Feel free to surf to mmy blog post; 온카

  48. These range from free servers –which lack options
    and are relatively gradual – to in style paid options suich as ExpressVPN and NordVPN.

    Feel free to surf to my web-site website

  49. Mostt main sportsbooks additionally offer odds on high-profile professional sports leagues such because the NFL, NBA, MLB, NHL, UFC,
    MLS, and extra.

    Feel free to surf to my page – website

  50. Bovada accepts six types of crypto – you can use BTC,
    Bitcoin Money, Dogecoin, Litecoin, Ethereum, or Tether on this web site.

    Stop by my site – here

Leave a Comment