QuestionQ27

Acceptance Criteria, Acceptance Tests and Experience-Based Practices

During a review session for Gherkin-language acceptance test cases on a project developing an event booking platform, consider this test case:

  1. GIVEN I am logged in to the event booking platform
  2. AND I have selected an event from the list shown for the "live concert" category
  3. WHEN I select the ‘Buy Tickets’ button
  4. AND I enter ‘3’ in the ‘Ticket quantity’ field
  5. AND I agree to the terms and conditions
  6. THEN the system should show the checkout page
  7. AND I should supply my personal data for payment and e-ticket delivery

Which sentence MOST closely matches a comment that could be made about this test case during the review?

  • A This test case is perfectly written.
  • B The “When” part lacks an action to enter a number of tickets requested that is greater than the limit allowed per person.
  • C Line 3 refers to an element of the user interface, which is to be avoided and line 7 is an action and not a result.
  • D Line 4 the quantity should not be set and line 7 is an action and not a result.
Explanation

In Gherkin acceptance tests, the Given block establishes preconditions, the When block specifies actions, and the Then block states observable expected results. Test cases should avoid references to specific user-interface elements, so referring to the ‘Buy Tickets’ button is inappropriate; supplying personal data is an action, not a Then result. ISTQB Certified Tester Acceptance Testing Syllabus

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!