Clear Acceptance Criteria for User Stories with Examples
- 481489 views
- 9 min
- Jan 07, 2020
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 in 2020
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:
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.
Subscribe via email and know it all first!