• Product Monk
  • Posts
  • Given-When-Then Acceptance Criteria: Write Clear & Structured Acceptance Criteria

Given-When-Then Acceptance Criteria: Write Clear & Structured Acceptance Criteria

Make your acceptance criteria understandable to non-tech people with this syntax!

Sponsored by

Need marketing assets? Like Yesterday?

Maybe your brand launch is tomorrow.

Maybe you have no hiring budget (been there). 

Or maybe your team is simply understaffed and overworked.

Regardless, if you need designs ASAP, you need Superside. They deliver high-quality, on-brand assets in as little as 24 hours.

Yup, Superside hires the top 1% of creatives across the globe, so you don’t have to vet freelancers or make any hasty hires in a pinch.

Why Superside?

  • Graphic design, websites, ad copy–it’s all on-brand and on-time

  • Used by over 450 companies like Google, Meta, Reddit, and Shopify

  • Transparent pricing from the start to save you up to 50%

TL;DR: It’s a design subscription service tailored for MM and ENT companies.

Start using Superside!

Read Time: 8 min | Active Subs: 33,088

Welcome to Product Monk, a 3x/week newsletter where we share the case studies of the most exciting tech products.

We wrote these three stories last week, hope you love them ❤️:

PS: Every email has a quick feedback at the bottom. Would really appreciate it if you give feedback there. Gives us a general sense of how our case studies/emails have been received and how to improve on them.

What Kind of a Product Manager Are You?

Here are the results from the previous email's (Khan Academy) quiz! Find out what kind of a PM you are!

If you chose __ in the previous post, you are:

A. Technical Enthusiast: Enjoys staying ahead of the curve and understanding the technology behind the product.

B. Networking Guru: Values relationship building and leveraging external partnerships for product success.

Find the next quiz right below!

Would you rather ...?

In the next post, I will reveal to you the kind of PM you are, based on the choice you make! Remember, no answer is right/wrong!

Login or Subscribe to participate in polls.

Given-When-Then Acceptance Criteria

Make your acceptance criteria understandable to non-tech people with this syntax!

Imagine you're building a spaceship (because who doesn't dream of cosmic adventures?). You wouldn't just weld some metal and throw in a rocket engine, right? You'd have a blueprint, a checklist, a "must-haves" list to ensure it actually soars, not sinks like a lead balloon.

Acceptance criteria are like that blueprint for your user stories. They lay out the "givens," the "whens," and the "thens," those crucial steps and expected outcomes that make your feature a success.

This post is your crash course in Given-When-Then (GWT) acceptance criteria. We'll explore why they're essential, how they work their magic, and even throw in some real-world examples.

By the end, you'll be writing acceptance criteria like a seasoned product manager, navigating your user stories to smooth landings and happy users.

Cat Working GIF by Looney Tunes

The Given-When-Then (GWT) format is a popular and effective way to write acceptance criteria for user stories or features in digital product development.

It's essentially a scenario-based approach that clarifies what needs to happen in a specific situation for a feature to be considered complete and successful. This approach is helpful when you want to communicate your acceptance criteria to non-technical folks in your company.

Let's break down each part, and then see an example:

Given:

This section sets the stage for the scenario. It describes the initial state of the system or application, including any relevant pre-conditions, data, or configurations. Think of it as the starting point for the test case.

When:

This section describes the action or event that triggers the scenario. It defines what the user does or what happens in the system to initiate the desired feature or functionality.

Then:

This section specifies the expected outcome or behavior after the action in the "When" section. It's the verification step, where you define the observable results and how the system should respond. Essentially, what should happen after the user takes the action described in "When".

Here's an example to illustrate the GWT format:

Given: I am logged in as a registered user in the online store.

When: I add a product to my shopping cart.

Then:

  • The product should be displayed in the shopping cart with the correct quantity and price.

  • The total cart amount should reflect the added product.

  • I should be able to see a confirmation message stating the product has been added.

The GWT format provides a clear, concise, and structured way to define acceptance criteria. It helps ensure everyone involved in the development process (developers, testers, product owners) understands what needs to be achieved and how to measure success.

Why You Should Use the GWT Acceptance Criteria?

1. Clarity and Readability

  • Non-technical stakeholders: 

    Imagine showing a marketing team a list of acceptance criteria like "Implement dynamic cart update." With GWT, you can write: "Given a product is added to the cart, When the shopper views the cart, Then the updated total amount and product list should be displayed."

    This format is clear, concise, and doesn't require technical jargon. It fosters collaboration and ensures everyone is on the same page.

  • Reduced ambiguity: 

    The structured GWT format eliminates vagueness, preventing misinterpretations of what constitutes "success." Each step is spelled out, minimizing confusion and rework.

2. Focus on Scenarios

  • Proactive edge case identification: 

    By writing scenarios, you're forced to think through different user paths and potential exceptions.

    This proactive approach helps uncover edge cases you might miss in traditional testing, leading to a more robust and well-rounded user experience.

  • Comprehensive testing coverage: 

    GWT encourages breaking down features into smaller, testable scenarios. This ensures every aspect of the functionality is covered in testing, leaving no stone unturned.

3. Improved Testing

  • Reusable test cases: 

    Each GWT acceptance criterion essentially becomes a mini-test case. These can be easily converted into automated tests or used as manual test case outlines, saving time and effort.

  • Streamlined testing process: 

    The clear structure of GWT criteria makes it easier to design and execute test plans. Each scenario outlines the necessary setup, actions, and expected outcomes, streamlining the testing process and improving efficiency.

4. Alignment with Agile Principles

  • Smaller, digestible chunks: 

    GWT aligns perfectly with Agile methodologies, where user stories are broken down into smaller, iterative deliverables.

    Each GWT scenario represents a testable piece of functionality, making it easier to manage and prioritize development within an Agile framework.

  • Increased transparency and collaboration: 

    The clarity and shared understanding fostered by GWT acceptance criteria facilitate open communication and collaboration within Agile teams.

    Stakeholders, developers, and testers can all easily grasp the goals and expectations, leading to smoother project execution.

Best Practices When Writing GWT Acceptance Criteria

1. Keep it simple and concise

  • Use clear, straightforward language that's easy to understand for both technical and non-technical stakeholders.

  • Avoid jargon or overly technical terms.

  • Focus on the essential details of each scenario.

  • Keep each GWT statement as concise as possible while still conveying the necessary information.

2. Focus on the user's perspective

  • Write the scenarios from the user's point of view, describing their actions and expected outcomes.

  • This helps ensure that the acceptance criteria are aligned with user needs and expectations.

3. Be specific and measurable

  • Avoid vague or ambiguous statements.

  • Clearly define the expected outcomes in a way that can be objectively verified.

  • Use quantifiable measures where possible (e.g., "The page should load in under 3 seconds").

4. Cover all possible scenarios

  • Consider different user roles, input variations, edge cases, and error conditions.

  • Write multiple GWT statements to ensure comprehensive testing coverage.

5. Collaborate with stakeholders

  • Involve product owners, testers, and developers in writing and reviewing the acceptance criteria.

  • This helps ensure that everyone understands the requirements and expectations.

6. Use a consistent format

  • Adhere to the standard Given-When-Then structure for all acceptance criteria.

  • This promotes readability and consistency across the project.

7. Review and update as needed

  • Keep the acceptance criteria up-to-date as the project evolves and requirements change.

  • Regularly review and refine the criteria to ensure they remain accurate and relevant.

Key Scenarios When Using GWT Syntax is Beneficial

1. Defining Acceptance Criteria

  • User stories: 

    GWT is widely used to describe the expected behavior of user stories in Agile development. It clearly outlines the conditions, actions, and outcomes, ensuring everyone involved understands what needs to be built and tested.

  • Product requirements: 

    Beyond user stories, GWT can also define acceptance criteria for broader product features or requirements. It's a helpful tool to clarify expectations and ensure alignment across teams.

2. Writing Test Cases

  • Manual testing: 

    GWT's structured format provides a clear template for writing manual test cases. Each GWT statement outlines the test setup, actions, and expected results, guiding testers through the testing process.

  • Automated testing: 

    GWT syntax can often be directly translated into automated test scripts using tools like Cucumber, SpecFlow, or JBehave. This streamlines test automation and ensures test cases closely align with acceptance criteria.

3. Facilitating Communication and Collaboration

  • Collaboration among stakeholders: 

    GWT's simplicity and readability make it an excellent tool for fostering collaboration between developers, testers, product owners, and other stakeholders.

    Everyone can easily understand the requirements and expectations, promoting shared understanding and reducing misunderstandings.

  • Non-technical stakeholders: 

    The user-friendly format of GWT makes it accessible to individuals without a technical background.

    This encourages active participation from business stakeholders and ensures their needs are accurately captured in the development process.

4. Supporting Behavior-Driven Development (BDD)

  • Core of BDD: 

    GWT syntax is the cornerstone of BDD, a software development approach that emphasizes collaboration and shared understanding through examples and scenarios.

    GWT provides a structured way to express these examples, driving development and testing efforts.

5. Enhancing Documentation

  • Clear and concise documentation: 

    GWT can be used to create clear and concise documentation of features and requirements. The scenarios provide a user-friendly way to understand the intended functionality of the system.

6. Refining User Stories

  • Break down complexities: 

    GWT can help break down complex user stories into smaller, more manageable scenarios. This improves clarity and focus, making it easier to estimate effort and prioritize development tasks.

In summary, GWT syntax is a versatile tool that can be applied in various software development activities to enhance communication, collaboration, testing, and documentation. Its focus on scenarios and expected outcomes helps ensure that the delivered software meets user needs and expectations.

The essence of strategy is choosing what not to do.

Michael Porter

♨️ Served hot from the industry!

This section includes some relevant articles/videos, people to check out, and links you might find interesting from around Product management.

👉🏻 Product Development Cycle (Link)

👉🏻 What are Product Insights? Types, Challenges, & More (Link).

👉🏻 3 Ways to Read Your Customers' Minds (Link)

We wrote these three stories last week, hope you love them ❤️:

Thank U Reaction GIF by Mauro Gatti

Reply

or to participate.