-
Product Management
Software Testing
Technology Consulting
-
Multi-Vendor Marketplace
Online StoreCreate an online store with unique design and features at minimal cost using our MarketAge solutionCustom MarketplaceGet a unique, scalable, and cost-effective online marketplace with minimum time to marketTelemedicine SoftwareGet a cost-efficient, HIPAA-compliant telemedicine solution tailored to your facility's requirementsChat AppGet a customizable chat solution to connect users across multiple apps and platformsCustom Booking SystemImprove your business operations and expand to new markets with our appointment booking solutionVideo ConferencingAdjust our video conferencing solution for your business needsFor EnterpriseScale, automate, and improve business processes in your enterprise with our custom software solutionsFor StartupsTurn your startup ideas into viable, value-driven, and commercially successful software solutions -
-
- Case Studies
- Blog
Clear Acceptance Criteria for User Stories with Examples
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.

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.







