Debate #4 – What’s the best way to write Acceptance Criteria?

The fourth installment of my blog series on “20 Controversial Topics of Debate in Agile” is about the best way to write Acceptance Criteria. If you’re reading this, I assume you know what Acceptance Criteria are. The scope of this blog is simply the format they take.

What formats can Acceptance Criteria take?

List-style Acceptance Criteria

List-style Acceptance Criteria is the most common Acceptance Criteria format, but that doesn’t necessarily mean it’s the best. I use this style when it’s preferred (or dictated) by my audience (a.k.a. my developers). This choice is often made because the developers either:

  1. Are super senior and don’t need/want much in the way of details to develop a solution, OR
  2. They don’t like to read a lot of words
image of a chalkboard with a checklist on it, representing list-style agile acceptance criteria for user stories

Example:

  • An error message displays if mandatory fields are not completed
  • Form information is stored in the database
  • Payment can be made via credit card (Visa, MasterCard, Discover, AmEx)
  • If anything goes wrong, the user will see a message indicating what is wrong
  • After submitting the form, an acknowledgment message is provided

List-style Acceptance Criteria Pros and Cons

Pros

  • Quick and dirty
  • Fewer words to read
  • Each item can be pass/fail
  • Can be used as a test case
  • Easy to understand
  • Leaves room for developer creativity
  • Contains “just enough” information

Cons

  • Not methodical
  • It’s easy to miss things
  • Doesn’t help discover gaps
  • Usually ignores negative cases
  • Can be misunderstood
  • May not have enough detail
  • Story boundaries may not be clear

Scenario-style Acceptance Criteria

Scenario-style Acceptance Criteria focus on the different paths a user can take to navigate the functionality of the story. This format reminds me of old-style Use Cases but in a slightly less formal manner. The key is to cover all the happy, unhappy, exception, and alternative paths so you don’t have any gaps.

Example:

Happy Path:

  • User can check out without any errors
  • User receives a confirmation after checkout
  • Order is successfully transmitted for fulfillment

Unhappy Path:

  • User receives an error and cannot proceed if required fields are empty
  • User cannot proceed until the required fields are populated

Exception Path:

  • Data validation on a field failed
  • Field with error is highlighted and the specific problem identified
  • User can correct the error

Alternative Path:

  • User can return to shopping if not ready to check out
  • Items in the cart will be saved

Scenario-style Pros and Cons:

Pros

  • More methodical than list-style
  • Ensures negative options are considered
  • The format is consistent and predictable
  • Can aid in writing structured test cases

Cons

  • Includes more words to read
  • Isn’t succinct; more narrative
  • Can take time to understand
  • It’s somewhat prescriptive

Behavior-Driven Development-style Acceptance Criteria

This type of Acceptance Criteria is one of my favorites, but it requires extra work. Behavior-driven Development (or BDD) uses a specific format that easily translates into test cases or even test automation using Gherkin. This approach is like scenario-style but is more structured and also has aspects of Use Cases. The format is:

Given: (pre-conditions)

When: (trigger)

Then: (post-conditions)

Example:

picture of gherkin pickles, but this is about behavior-driven development (BDD) for agile acceptance criteria
Nope, not the pickle, the syntax

Given:

  • I ‘m a logged-in user
  • My account is active
  • I have added items to my cart

When:

  • I proceed to checkout

Then:

  • My information is pre-populated
  • Previously saved payment options are available
  • Items in my cart with prices are displayed, along with a total
  • I see an option to enter a promo code

Behavior-driven Development-style Pros and Cons

Pros

  • Very logical and methodical
  • Ensures all scenarios are covered
  • Testable by design
  • Can be used to create automated tests
  • Includes pre- and post-conditions
  • The format is consistent and predictable
  • Can cover multiple scenarios

Cons

  • Takes a lot longer to write
  • A lot of reading is required for developers
  • Doesn’t leave a lot of developer flexibility
  • It may be overkill, depending on the situation
  • Can become overly complex

Tabular-style Acceptance Criteria

Acceptance Criteria in tabular format are useful when there’s a lot of data that needs to be validated. It’s also appropriate for rule-based Acceptance Criteria and helps automate decision-making based on a set of pre-defined rules.

Example:

ConditionCase 1Case 2Case 3Case 4Case 5
Customer has an accountYYYYN
Customer is logged inYYYNN
All required fields are populatedYYNNN
Payment method is availableYNNNN
Can customer check out?YNNNN

Pros and Cons of Tabular-style Acceptance Criteria

Pros

  • Very structured
  • Makes complex options simpler
  • Works well with lots of data
  • Fewer words to read
  • Helps ensure full test coverage

Cons

  • Can be overwhelming
  • It may still be too complex
  • Does not provide as much context

What do you think?

So, now that you know about different ways to write Acceptance Criteria, which style do you think is the best? Are there any other methods of documenting Acceptance Criteria that you have used? Let me know in the comments area below!

And up next in this blog series:

  1. Can you use a Sprint 0 in Agile?
  2. Do you need Documentation in Agile?
  3. Is there a “right” way to write User Stories?
  4. What’s the best way to write Acceptance Criteria?
  5. How long should your Agile sprints be?
  6. Should all your Agile teams be run the “same” way?
  7. Which “flavor” of Agile is best?
  8. Can agile co-exist with waterfall?
  9. Story Size – What’s an Epic, Theme, Feature…?
  10. Can the Scrum Master be a team member, too?
  11. Can distributed Agile teams work?
  12. How should you estimate in Scrum & Agile?
  13. Is it OK to add items to the current Sprint?
  14. How should you manage your Agile backlog?
  15. Can an Agile team have more than one Product?
  16. What is the optimal size for Agile teams?
  17. Should Agile teams stay together?
  18. How should you handle defects in Agile?
  19. Can a hybrid of Waterfall and Agile succeed?
  20. What are the official roles on an Agile Team?