This website uses cookies to better the user experience of its visitors. Where applicable, this website uses a cookie control system, allowing users to allow or disallow the use of cookies on their computer/device on their first visit to the website. This complies with recent legislative requirements for websites to obtain explicit consent from users before leaving behind or reading files such as cookies on a user’s computer/device. To learn more click Cookie Policy.

Privacy preference center

Cookies are small files saved to a user’s computer/device hard drive that track, save, and store information about the user’s interactions and website use. They allow a website, through its server, to provide users with a tailored experience within the site. Users are advised to take necessary steps within their web browser security settings to block all cookies from this website and its external serving vendors if they wish to deny the use and saving of cookies from this website to their computer’s/device’s hard drive. To learn more click Cookie Policy.

Manage consent preferences

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Cookies list
Name _rg_session
Provider rubygarage.org
Retention period 2 days
Type First party
Category Necessary
Description The website session cookie is set by the server to maintain the user's session state across different pages of the website. This cookie is essential for functionalities such as login persistence, ensuring a seamless and consistent user experience. The session cookie does not store personal data and is typically deleted when the browser is closed, enhancing privacy and security.
Name m
Provider m.stripe.com
Retention period 1 year 1 month
Type Third party
Category Necessary
Description The m cookie is set by Stripe and is used to help assess the risk associated with attempted transactions on the website. This cookie plays a critical role in fraud detection by identifying and analyzing patterns of behavior to distinguish between legitimate users and potentially fraudulent activity. It enhances the security of online transactions, ensuring that only authorized payments are processed while minimizing the risk of fraud.
Name __cf_bm
Provider .pipedrive.com
Retention period 1 hour
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to support Cloudflare Bot Management. This cookie helps to identify and filter requests from bots, enhancing the security and performance of the website. By distinguishing between legitimate users and automated traffic, it ensures that the site remains protected from malicious bots and potential attacks. This functionality is crucial for maintaining the integrity and reliability of the site's operations.
Name _GRECAPTCHA
Provider .recaptcha.net
Retention period 6 months
Type Third party
Category Necessary
Description The _GRECAPTCHA cookie is set by Google reCAPTCHA to ensure that interactions with the website are from legitimate human users and not automated bots. This cookie helps protect forms, login pages, and other interactive elements from spam and abuse by analyzing user behavior. It is essential for the proper functioning of reCAPTCHA, providing a critical layer of security to maintain the integrity and reliability of the site's interactive features.
Name __cf_bm
Provider .calendly.com
Retention period 30 minutes
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to distinguish between humans and bots. This cookie is beneficial for the website as it helps in making valid reports on the use of the website. By identifying and managing automated traffic, it ensures that analytics and performance metrics accurately reflect human user interactions, thereby enhancing site security and performance.
Name __cfruid
Provider .calendly.com
Retention period During session
Type Third party
Category Necessary
Description The __cfruid cookie is associated with websites using Cloudflare services. This cookie is used to identify trusted web traffic and enhance security. It helps Cloudflare manage and filter legitimate traffic from potentially harmful requests, thereby protecting the website from malicious activities such as DDoS attacks and ensuring reliable performance for genuine users.
Name OptanonConsent
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonConsent cookie determines whether the visitor has accepted the cookie consent box, ensuring that the consent box will not be presented again upon re-entry to the site. This cookie helps maintain the user's consent preferences and compliance with privacy regulations by storing information about the categories of cookies the user has consented to and preventing unnecessary repetition of consent requests.
Name OptanonAlertBoxClosed
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonAlertBoxClosed cookie is set after visitors have seen a cookie information notice and, in some cases, only when they actively close the notice. It ensures that the cookie consent message is not shown again to the user, enhancing the user experience by preventing repetitive notifications. This cookie helps manage user preferences and ensures compliance with privacy regulations by recording when the notice has been acknowledged.
Name referrer_user_id
Provider .calendly.com
Retention period 14 days
Type Third party
Category Necessary
Description The referrer_user_id cookie is set by Calendly to support the booking functionality on the website. This cookie helps track the source of referrals to the booking page, enabling Calendly to attribute bookings accurately and enhance the user experience by streamlining the scheduling process. It assists in managing user sessions and preferences during the booking workflow, ensuring efficient and reliable operation.
Name _calendly_session
Provider .calendly.com
Retention period 21 days
Type Third party
Category Necessary
Description The _calendly_session cookie is set by Calendly, a meeting scheduling tool, to enable the meeting scheduler to function within the website. This cookie facilitates the scheduling process by maintaining session information, allowing visitors to book meetings and add events to their calendars seamlessly. It ensures that the scheduling workflow operates smoothly, providing a consistent and reliable user experience.
Name _gat_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _gat_UA-* cookie is a pattern type cookie set by Google Analytics, where the pattern element in the name contains the unique identity number of the Google Analytics account or website it relates to. This cookie is a variation of the _gat cookie and is used to throttle the request rate, limiting the amount of data collected by Google Analytics on high traffic websites. It helps manage the volume of data recorded, ensuring efficient performance and accurate analytics reporting.
Name _ga
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga cookie is set by Google Analytics to calculate visitor, session, and campaign data for the site's analytics reports. It helps track how users interact with the website, providing insights into site usage and performance.
Name _ga_*
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga_* cookie is set by Google Analytics to store and count page views on the website. This cookie helps track the number of visits and interactions with the website, providing valuable data for performance and user behavior analysis. It belongs to the analytics category and plays a crucial role in generating detailed usage reports for site optimization.
Name _gid
Provider rubygarage.org
Retention period 1 day
Type First party
Category Analytics
Description The _gid cookie is set by Google Analytics to store information about how visitors use a website and to create an analytics report on the website's performance. This cookie collects data on visitor behavior, including pages visited, duration of the visit, and interactions with the website, helping site owners understand and improve user experience. It is part of the analytics category and typically expires after 24 hours.
Name _dc_gtm_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _dc_gtm_UA-* cookie is set by Google Analytics to help load the Google Analytics script tag via Google Tag Manager. This cookie facilitates the efficient loading of analytics tools, ensuring that data on user behavior and website performance is accurately collected and reported. It is categorized under analytics and assists in the seamless integration and functioning of Google Analytics on the website.

Clear Acceptance Criteria for User Stories with Examples

  • 1126221 views
  • 9 min
  • Jan 07, 2020
Maryna Z.

Maryna Z.

Copywriter

Dmitriy G.

Dmitriy G.

Head of BA Office

Share

In a perfect world, people would understand each other at a glance and nothing could create confusion among them. But in the real world we have to come up with ways to communicate our ideas clearly so that our peers don’t misunderstand us.

In software development, acceptance criteria help to properly set a client’s expectations for a product. Criteria for an app such as “I want my app to be awesome and popular with as many people as possible” don’t really tell us much; we eliminate misunderstandings between a client and a development team by referring to clearly defined acceptance criteria for user stories.

In this post we’ll talk about acceptance criteria in Agile methodologies (like Scrum and Kanban) and provide you with a few examples of well-written acceptance criteria.

Scrum, User Stories, and Acceptance Criteria Aren’t Just Buzzwords

We’ve mentioned Scrum for a good reason. Scrum is an Agile framework that helps software development teams deliver products of any complexity. At RubyGarage, we prefer to work according to the Scrum methodology, and recently we even released our own app for Scrum poker - Scrummer.

With Scrum (just like with any Agile approach), we operate with such terms as “user stories” and “acceptance criteria” to ensure clear descriptions of how end-users will use an app and how a team should fulfill each task.

When we start to build a product, we cooperate with our clients to define user stories. User stories are written in the following format: “

As a (type of user), I want to (perform some action) so that I (can achieve some goal/result/value).”

The purpose of user stories is to explain the roles of users in a system, their desired activities, and what they intend to accomplish by successfully completing a user story. For Agile teams, user stories are the primary method of identifying user needs.

Defining Acceptance Criteria

So how can we make sure that user stories are completed correctly and comply with a client’s demands? This is where acceptance criteria come into play. Acceptance criteria are a formalized list of requirements that ensure that all user stories are completed and all scenarios are taken into account. Put simply, acceptance criteria specify conditions under which a user story is fulfilled. Concisely written criteria help development teams avoid ambiguity about a client’s demands and prevent miscommunication.

Writing acceptance criteria is not only important for eliciting the vision of a product from your client, but for the development process as well. It’s natural that different people see the same problem from different angles. Clearly written criteria introduce a single solution to the functionality you intend to implement.

What are Acceptance Criteria Used For?

  • To define boundaries. Acceptance criteria help development teams define the boundaries of a user story. In other words, acceptance criteria help you confirm when the application functions as desired, meaning that a user story is completed.
  • To reach consensus. Having acceptance criteria synchronizes the development team with the client. The team knows exactly what conditions should be met, just as the client knows what to expect from the app.
  • To serve as a basis for tests. Last but not least, acceptance criteria are a cornerstone of positive and negative testing aimed at checking if a system works as expected.
  • To allow for accurate planning and estimation. Acceptance criteria scenarios allow for the correct division of user stories into tasks so user stories are correctly estimated and planned.

Who Writes Acceptance Criteria and When?

Either a client or a development team writes acceptance criteria. As a rule, criteria written by a product owner (the client) are reviewed by a member of the development team to make sure that the criteria are clearly specified and that there are no technical constraints or inconsistencies from the development perspective. Such flow is an excellent way to collaborate if a product owner has some experience in software development and is aware of how to write project documentation.

If you prefer to assign writing acceptance criteria to the development team, then a requirements analyst, project manager or QA specialist should deal with this task, since they know the technology stack and the feasibility of features.

Remember that acceptance criteria should be specified upfront and never after the development stage has started. Therefore, a team and a product owner should agree on minimum deliverables that will meet the product owner’s requirements.

How to Write Acceptance Criteria

There are several types of acceptance criteria. The most popular are rules-oriented (in the form of a list) and scenario-oriented (in the form of scenarios that illustrate each criterion). The scenario-oriented type is popular among Agile teams since it helps with getting across requirements, envisaging various use cases, and further using scenarios for manual and automated acceptance tests.

The common template for describing acceptance criteria using a scenario-oriented approach is the Given/When/Then format that is derived from behaviour-driven development (BDD). The Given/When/Then format is used for writing acceptance tests that ensure that all the specification requirements are met.

This format is convenient for humans (since it’s written in a familiar cause-and-effect manner) as well as for automated testing tools like Cucumber and RSpec. For example, when we build a website that has two types of users ‒ logged-in users and guests ‒ we’re likely to write the following acceptance criteria for a user story that defines the sign-in feature for a logged-out user:

As a logged-out user
I want to be able to sign in to a website
So that I can find acess my personal profile

Scenario: System user signs in with valid credentials
“Given I’m a logged-out system user
and I’m on the Sign-In page
When I fill in the “Username” and “Password” fields with my authentication credentials
and I click the Sign-In button
Then the system signs me in”

The Given/When/Then template helps you reduce the time spent on writing test cases since you describe the system’s behaviour upfront. We prefer writing acceptance criteria with the first-person “I” since it helps us talk from a user’s perspective and keep a user’s needs in mind.

Here are a few tips that’ll help you write great acceptance criteria:

  • Keep your criteria well-defined so any member of the project team understands the idea you’re trying to convey.
  • Keep the criteria realistic and achievable. Define the minimum piece of functionality you’re able to deliver and stick to it. On the other hand, don’t try to describe every detail since you risk cluttering up your backlog and getting buried under many small tasks.
  • Coordinate with all the stakeholders so your acceptance criteria are based on consensus.
  • Create measurable criteria that allow you to adequately estimate development time so you’re able to stay within budget and time constraints.
  • Consider providing checklists that enable you to see what user stories are covered with acceptance criteria.
Clear and unclear acceptance criteria
Clearly written acceptance criteria efficiently save development time

Examples of Acceptance Criteria

In this section we’ll take a look at examples of acceptance criteria written for common features present on most websites. We’ll define user stories upfront because acceptance criteria are written after we’ve specified all functionality through user stories.

Example #1

Our first user story describes the webpage search feature:

As a website user
I want to able to search on the webpage
So that I can find necessary information

According to the Given/When/Then template, the acceptance criteria would be the following:

Scenario: User searches for an item by its name
“Given that I’m in a role of registered or guest user
When I open the “Products” page
Then the system shows me the list of all products
And the system shows the “Search” section in the right top corner of the screen
When I fill in the “Search” field with the name of existing item in the product list
And I click the “Apply” button OR press the Enter key on keyboard
Then the system shows products in the Search Results section with product names matching entered product name
And the system shows the number of search results in the top of the Search Results section”

Example #2

The next example represents the acceptance criteria for a Feedback Form page. The user story would be the following:

As a website user
I want to able to submit feedback
So that the website owners can consider my opinion or concern during future website updates

Acceptance criteria for this piece of functionality would be:

Scenario: User submits feedback form with the valid data
“Given I’m in a role of logged-in or guest user
When I open the Feedback page
Then the system shows me the Submit Feedback form containing “Email”,“Name” and “Comment” fields which are required
When I fill in the “Email” field with a valid email address
And I fill in the “Name” field with my name
And I fill in the “Comment” field with my comment
And I click the “Submit Feedback” button
Then the system submits my feedback
And the system shows the “You’ve successfully submitted your feedback” flash message
And the system clears the fields of the Submit Feedback form”

Example #3

Finally, let’s specify the user story and acceptance criteria for commenting functionality on a blog. Only signed-in users are able to add comments. The user story for an “add a comment” feature would be:

As a signed-in user
I want to able to comment on a blog post
So that I can get feedback on issues

The acceptance criteria for this piece of functionality would be:

Scenario: Signed-in user leaves a comment on a blog post
“Given I’m in a role of signed-in user
When I open the page with a specific blog post
Then the system shows the “Comments” section below the blog post with the list of comments added by other users
And the system shows the “Add a Comment” field in the top of the “Comments” section
When I fill in the “Add a Comment” field with my comment
And I click the “Submit” button
Then the system saves my comment
And the system shows my comment in the top of the “Comments” section
And the system shows my username and profile picture on the left side from my comment
And the system shows “Remove” and “Edit” icons opposite my comment”

Wrapping Up

As you can see, writing acceptance criteria is truly a win-win activity for both clients and development teams: not only does it help the team know exactly what they have to do, but it keeps the client abreast of development process and lets them check that developed software meets actual business requirements.

Don’t let user stories and acceptance criteria scare you off ‒ the time you invest in describing and specifying all the features will eventually pay off. Acceptance criteria serve as a basis for use cases and test cases that ensure you achieve business goals and produce bug-free apps.

CONTENTS

Authors:

Maryna Z.

Maryna Z.

Copywriter

Dmitriy G.

Dmitriy G.

Head of BA Office

Rate this article!

Nay
So-so
Not bad
Good
Wow
148 rating, average 4.64 out of 5

Share article with

Comments (6)
Dharmesh Barot
Dharmesh Barot over 6 years ago
Hi Maryna and Dmitriy, Thanks for your clarity on writing user stories with acceptance criteria. Would you mind elaborating if field validation, field type, etc. would be captured under the acceptance criteria or use a separate supporting document like a form spec? Also, what about negative scenarios where what happens when a form validation fails? I usually write a separate story for that. Do you add as a scenario or a separate story?
Reply
Dmitriy G.
Dmitriy G. over 6 years ago
Hi, Dharmesh! Thanks for your question. There is no need to write a separate user story or scenario to capture field validations. That could be captured in acceptance criteria. Let's say that you have some user story where in some scenario you need to fill in some form and that form consists of a set of fields. You can simply create a table where you can describe requirements to each of these fields and link that table to your scenario. So for each field you need to know the next parameters: - label (defines a label for an <input> element), - description, - type (HTML input type, for example, input type="text", input type =”number” etc), - validation (where you can indicate if it's required or optional, specify validation rules, for example, for input type=”number” that could be minimum value allowed, - maximum value allowed, default value etc), - error messages (here you can indicate what error message should be shown when validation fails, for example for input type=”email” that could be: “Email can't be blank” if input is empty, “The value is not a valid email address” if entered value failed regexp validation etc). That's easy to create and support, efficient, informative enough and will not increase specification too much. As the result, based on such specification, a QA specialist creates positive and negative test cases covering that scenario. Regards
Reply
Vinesh Singh
Vinesh Singh about 6 years ago Dmitriy G.
hi, I have a couple of questions which i hope you can assist. How would business rules and non-functional requirements be captured using GWT? Similar to field validations mentioned by Dharmesh, would these sit inside the acceptance criteria? Also, correct me if im wrong but can a user story include more than 1 scenario? Last question, will alternate paths be considered another scenario for a particular user story? Thanks in advance.
Reply
Dmitriy G.
Dmitriy G. about 6 years ago Dmitriy G.
Hi, Vinesh! User Story can have multiple scenarios which depend on the complexity of the business logic and the number of business rules. You're right while saying that alternative paths could be described as separate scenarios to the same user story. Alternative path usually considers having a different set of preconditions and outcomes. Let's say that we have some user story in an e-commerce application which is oriented on delivering orders to customers from some local market (for example, USA) but also allows to deliver orders to customers from other countries outside the local market. As a customer I want to fill in my shipping address so that sender knows where to deliver my order. In the business logic, there could be the next alternative paths: Customer fills in local shipping address during checkout AND Customer fills in international shipping address during checkout. There are several different scenarios since API of integrated shipping service returns different shipping methods for local based shipping and for international shipping (which is outside the local area). At the same time when you are working on decomposition of the epic into user stories, you should take into consideration not only activity which should be performed by some role in the application but also the purpose of the activity. That should help you understand if it should be another scenario of already described user story or an absolutely new user story. To be clear could you please share some particular examples of alternative paths you are talking about so that I could look at them? Gherkin is a good way to describe acceptance criteria. But NFRs must be satisfied by a number of stories unlike acceptance criteria which are defined on a per story basis. In that context, NFRs are more close to Definition of Done concept where each user story should be compliant with entire list of NFRs.
Reply
Martin Morrey
Martin Morrey over 6 years ago
Hi. Interesting article. However, your multiple "when-then" pairs seem to break this "cardinal rule of BDD", https://automationpanda.com/2018/02/03/are-gherkin-scenarios-with-multiple-when-then-pairs-okay/. As a relative newcomer to Gherkin, I am now a bit confused about whether this is a good way to use it or not. Thanks, Martin
Reply
Баки Барнс
Баки Барнс about 4 years ago Martin Morrey
Test
Your comment will appear after the admin moderation
Vijay Ji
Vijay Ji over 4 years ago Martin Morrey
Hi Madam, could you please send me Use case format with Acceptance Criteria is included [email protected]
Your comment will appear after the admin moderation
Maryna Z.
Maryna Z. over 6 years ago Martin Morrey
Hi there! Thanks for your reply. We see your point here and we think it's a nice idea for article update :) Stay in touch with our news ;)
Reply

Subscribe via email and know it all first!