QA Graphic

Acceptance Criteria Best Practices

Tips and Tricks to writing a winning acceptance criteria

A common mistake inexperienced teams make when defining acceptance criteria for a story is combining the mechanics of test execution with the test's purpose. They attempt to describe both what they want to test and how it will be tested simultaneously, which often leads to confusion.

Example of Poorly Defined Acceptance Criteria

Below is an example of mixing test mechanics and purpose, which can lead to unclear requirements:


As a user, I want to log in so that I can access my account 
by entering my username and password into the login form, 
clicking the submit button, and verifying that the server 
responds with a 200 status code and a session token.
        

This example mixes the user's goal (logging in) with implementation details (server response, session token), making it harder to understand the core requirement.

Improved Acceptance Criteria

Focus on the purpose of the test, keeping it clear and concise:


Given a user with valid credentials
When they enter their username and password and submit the login form
Then they are granted access to their account
        

This version uses the Given-When-Then format to clearly separate the context, action, and expected outcome, avoiding technical implementation details.

Key Tips for Writing Acceptance Criteria

  • Focus on the user's intent and the desired outcome, not the implementation.
  • Use clear, simple language to ensure shared understanding.
  • Separate the "what" (purpose) from the "how" (test execution mechanics).
  • Use formats like Given-When-Then to structure criteria logically.

 

Comments

Add Your Comments

Name:
Comment: