Question 3:
You are given the following use case for an online food ordering system. Your task is to create functional black-box test cases based on this use case using use-case-based testing techniques.
Use Case: Place a Food Order
Primary Actor: Customer
Preconditions:
The customer must be logged into the system.
• The customer must have at least one food item in their cart.
Main Success Scenario (Normal Flow):
1. The customer adds food items to their cart.
2. The customer selects a delivery option (e.g., standard delivery, express delivery).
3. The customer applies a discount code (optional).
4. The system validates the discount code.
5. The customer enters delivery details (e.g., address, phone number).
6. The customer proceeds to payment.
7. The system processes the payment.
8. The system confirms the order and provides an estimated delivery time.
Alternative Flows:
Al: If the customer selects express delivery, the system adds an extra delivery charge.
A2: If the discount code is expired, the system displays an error message, and the customer can proceed without a discount.
A3: If the customer chooses to pay with a credit card, the system prompts for card details (e.g., card number, expiry date, CVV).
A4: If the customer opts for a pickup instead of delivery, the system omits the delivery charge and prompts for a pickup time.
Exception Scenarios:
El: If the payment fails (e.g., insufficient funds or incorrect card details), the system notifies the customer and prompts them to retry payment.
E2: If the cart is empty when attempting to place the order, the system prompts the customer to add items before proceeding.
Postconditions:
FOUWERFLOWM.COM
The customer receives an order confirmation and an estimated delivery/pickup time.The system updates the inventory based on the order.