Bird
0
0

In an acceptance test for a shopping cart, the scenario is:

medium📝 Predict Output Q5 of 15
Testing Fundamentals - Testing Types and Levels
In an acceptance test for a shopping cart, the scenario is:
Given the cart is empty
When the user adds an item
Then the cart contains 1 item

What should the test verify?
AThe cart remains empty after adding an item
BThe user is redirected to checkout immediately
CThe cart count increases to 1 after adding an item
DThe item is removed from the cart
Step-by-Step Solution
Solution:
  1. Step 1: Understand the scenario steps

    The cart starts empty, user adds an item, so the cart should have 1 item.
  2. Step 2: Identify correct verification

    The cart count increases to 1 after adding an item correctly states the cart count increases to 1. Other options contradict the scenario.
  3. Final Answer:

    The cart count increases to 1 after adding an item -> Option C
  4. Quick Check:

    Acceptance test verifies cart count = 1 [OK]
Quick Trick: Check 'Then' step matches expected state change [OK]
Common Mistakes:
  • Expecting no change after adding item
  • Assuming immediate checkout redirection
  • Confusing add and remove actions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Testing Fundamentals Quizzes