//pragmatic leaders

Acceptance Criteria and Gherkin for Clear Product Outcomes

Reading time
6 min
Section
Agile Product Management- PLPM
6 min left0%
acceptance criteria and gherkin for clear product outcomes0%
6 min left
Acceptance criteria is a must for every user story. When done right, it aligns all stakeholders on what 'done' really means.
Talvinder Singh, from a Pragmatic Leaders session on Agile product management

Acceptance criteria are the foundation for knowing when a user story or feature is truly complete. Without them, teams operate with assumptions, resulting in missed requirements, quality gaps, and friction between product, engineering, and QA.

The actual job of acceptance criteria is to eliminate ambiguity — to make explicit what success looks like for a feature before any code is written. They are the contract between what the business wants, what engineering builds, and what QA tests.

In practice, many teams skip writing good acceptance criteria or write them as vague bullet points. That is a costly mistake. The trap is to think acceptance criteria are optional, or that user stories alone suffice. They do not.

Why acceptance criteria matter

Acceptance criteria serve multiple critical purposes:

  • Clarity for engineers: They provide precise, testable conditions engineers can implement against, reducing rework.
  • Alignment with QA: They enable QA to write acceptance tests that verify the feature meets the intended behavior.
  • Shared understanding: They create a common language for product, business, and technical stakeholders to agree on scope and quality.
  • Scope control: They prevent scope creep by defining exactly what is in and out of a feature.
  • User focus: Good acceptance criteria describe the user experience and outcomes, not just technical specs.

Without acceptance criteria, you get stories with "should work on these browsers" or "should have XYZ," which are too vague to build or test reliably.

The Given-When-Then format and Behavior Driven Development (BDD)

A widely adopted format for acceptance criteria is the Given-When-Then syntax, popularized by Behavior Driven Development (BDD).

This format expresses behavior in a simple, structured way:

  • Given some initial context,
  • When an action happens,
  • Then expect a specific outcome.

For example:

Given I am logged in as a premium user
When I publish a blog post
Then the post is visible on my profile immediately

This syntax has several advantages:

  • It describes behavior without prescribing implementation.
  • It is easy to understand for non-technical stakeholders.
  • It can be linked directly to automated acceptance tests.

Talvinder explains:

"Gherkin is a domain-specific language which allows you to write user acceptance tests based on the acceptance criteria. It serves as a common ground for business, QA, and developers, improving collaboration. Gherkin links acceptance tests to automated tests through tools like Cucumber."

Gherkin: The language of acceptance criteria

Gherkin is the language that uses Given-When-Then statements to write acceptance criteria in plain English (or other languages). It supports keywords such as:

  • Feature
  • Scenario
  • Given
  • When
  • Then
  • And
  • But
  • Background
  • Scenario Outline
  • Examples

A typical Gherkin feature file might look like:

Feature: Post a blog

  Scenario: Premium user publishes a blog
    Given I am logged in as a premium user
    When I publish a blog post
    Then the post appears on my profile
    And I can share the post on social media

This format is both human-readable and machine-parseable, making it ideal for bridging product and engineering.

How Gherkin improves collaboration

The clarity of Gherkin syntax eliminates the communication gap that often exists between product, engineering, and QA. Everyone reads the same language and understands exactly what the expected behavior is.

Talvinder notes:

"It makes it dead clear: this is Given, this is When, this is Then. You can then link acceptance tests to automated tests, ensuring the delivered feature matches the requirement exactly."

This reduces back-and-forth, guesswork, and rework, speeding up delivery and improving quality.

Writing good acceptance criteria

Acceptance criteria should be:

  • Testable: You can verify if the condition is met.
  • Clear and unambiguous: No room for interpretation.
  • Focused on user behavior: Describe how the user interacts with the feature and what they expect.
  • Complete: Cover both positive and negative scenarios.
  • Concise: Avoid unnecessary complexity.

Avoid vague statements like "the feature should be fast" or "the UI should look nice." Instead, specify measurable outcomes:

  • "Page load time must be under 2 seconds on a standard 4G connection."
  • "Error message 'Invalid password' is displayed when login fails."
  • "Non-premium users see a prompt to upgrade when attempting to publish more than zero blogs."

Acceptance criteria in the product development lifecycle

Acceptance criteria are not just documentation. They are living artifacts used throughout the lifecycle:

  • During grooming: To clarify scope and catch missing requirements.
  • During development: To guide implementation and help engineers know when done.
  • During QA: To write test cases and validate feature correctness.
  • During demos: To verify the feature meets stakeholder expectations.

Teams that consistently write good acceptance criteria ship features faster, with fewer bugs and less rework.

Example: Acceptance criteria for a blog feature using Gherkin

Here is a real example Talvinder shared:

Feature: Post a blog

  As a logged-in user
  I want to post informative blogs
  So that I can share updates and raise my profile

  Scenario: Premium user publishes a blog
    Given I am logged in as a premium user
    When I create a new blog post
    Then I can publish up to five free blogs
    And the blog is visible to other users

  Scenario: Non-premium user attempts to publish a blog
    Given I am logged in as a non-premium user
    When I try to publish a blog post
    Then I see a message "Upgrade to premium to publish blogs"
    And the blog is not published

This clearly defines the expected user behavior and business rules.

Beyond Gherkin: Extending acceptance criteria for product management

Talvinder has explored extending Gherkin to better fit product management needs beyond QA. His framework called Carrot builds on Gherkin by including:

  • Feature title/name
  • Background/context
  • Problem statement
  • Solution description
  • User stories
  • Success criteria
  • Acceptance criteria
  • Designs and UX flows

Carrot aims to converge on expected behavior that every stakeholder agrees to, written in a simple, text-based, source-controlled format for collaboration.

While Gherkin focuses on behavior, Carrot adds product context and success metrics to acceptance criteria, helping PMs maintain control over feature quality and scope.

Tools and resources for acceptance criteria

Talvinder recommends these to teams aiming to improve collaboration and product quality through structured acceptance criteria.

The trap of skipping acceptance criteria

Here is the uncomfortable reality:

"Writing acceptance criteria is a practice that is not followed clearly or well enough in most teams. I wish it was used more frequently because when you do it, all stakeholders are very happy when the final product completes all the criteria."

Without acceptance criteria, teams waste time debating whether a feature is done, QA misses test cases, and customers get confused by inconsistent experiences.

How to start integrating acceptance criteria in your team

  • Make acceptance criteria mandatory for every user story.
  • Train your team on the Given-When-Then format.
  • Collaborate with QA early to write testable criteria.
  • Use tools like Gherkin and Cucumber for automation.
  • Review acceptance criteria in grooming sessions.
  • Keep criteria focused on user behavior and outcomes.

Video: Unlocking Success with Acceptance Criteria

Test yourself: Writing acceptance criteria for a new feature

// learn the judgment

You are the PM at a Series A SaaS startup in Bangalore. Your team is building a 'Schedule Meeting' feature that allows users to book a meeting with sales. The CEO wants you to write acceptance criteria for the user story.

The call: Write acceptance criteria in Given-When-Then format that cover successful booking, invalid input, and capacity limits.

Your reasoning:

Where to go next

PL alumni now work at Razorpay, Swiggy, Flipkart, PhonePe, Postman, and other leading Indian tech companies.