CSE 270: Software Testing - Reading Material

2.2 Acceptance Criteria

Creating clear and effective acceptance criteria is a crucial step in ensuring the successful delivery of high-quality products. Acceptance criteria define the conditions that must be met for a software requirement to be considered complete and ready for release. Well-crafted acceptance criteria not only serve as a bridge between stakeholders and development teams but also contribute to the overall success of the project.

Understanding Acceptance Criteria

Acceptance criteria outline the specific conditions and functionalities that a feature must satisfy to meet the expectations of stakeholders. Well-crafted acceptance criteria are clear, measurable, and testable, providing a shared understanding of what needs to be delivered.

The Given-When-Then Format

The Given-When-Then format is a structured way of writing acceptance criteria for user stories or features. It helps when defining the behavior of a system from an end user's perspective. The format provides a clear and concise structure that helps stakeholders, developers, and testers understand the desired functionality and expected outcomes.

Here's a breakdown of the Given-When-Then format:

Example Scenario

Putting it all together, here's an example scenario using the Given-When-Then format:

Given a registered user with items in the shopping cart,

When the user proceeds to checkout,

Then the system must calculate the total cost, apply any eligible discounts, and display the final amount for confirmation.

In this scenario:

Best Practices for Creating Acceptance Criteria

Examples of Effective Acceptance Criteria

Examples of Poor Acceptance Criteria

Review and Iteration

Conclusion

Writing effective acceptance criteria allows the tester to establish clear expectations for the system. It is invaluable when crafting test cases, which will be explained in the next section, in order to validate the system is performing as expected.