Task 5: Testing – Test Cases for Online Food Ordering System
Objective
The purpose of this task is to validate that the online food ordering system functions as intended, meets
user requirements, and ensures reliability under various scenarios.
Test Case Components
Each test case should include the following details:
1. Test Case ID: Unique identifier for the test case.
2. Description: Brief overview of what the test aims to validate.
3. Preconditions: Any setup or conditions required before the test can be run.
4. Steps to Execute: Step-by-step instructions for carrying out the test.
5. Expected Outcome: The expected behavior or result if the system works correctly.
6. Actual Outcome: The observed behavior when the test is executed (filled during testing).
7. Status: Pass or Fail, based on whether the actual outcome matches the expected outcome.
Types of Test Cases
1. Functional Test Cases
o Validate core functionalities of the system.
o Examples:
User Registration and Login.
Adding items to the cart.
Placing an order.
Payment processing.
2. Non-Functional Test Cases
o Evaluate system performance, usability, and reliability.
o Examples:
Page load time under peak traffic.
System behavior with invalid inputs.
Compatibility with different devices and browsers.
Example Test Cases
1. Test Case 1: User Registration
o Test Case ID: TC001
o Description: Verify that a new user can register successfully.
o Preconditions: User must have a valid email address.
o Steps to Execute:
1. Navigate to the registration page.
2. Fill in required details (e.g., name, email, password).
3. Click "Register".
o Expected Outcome: User receives a confirmation message, and the account is created.
o Actual Outcome: (Filled during testing).
o Status: Pass/Fail.
2. Test Case 2: Adding Items to Cart
o Test Case ID: TC002
o Description: Verify that items can be added to the cart.
o Preconditions: User must be logged in.
o Steps to Execute:
1. Browse available food items.
2. Select a food item and click "Add to Cart".
3. Check the cart.
o Expected Outcome: Item appears in the cart with correct details (name, quantity, price).
o Actual Outcome: (Filled during testing).
o Status: Pass/Fail.
3. Test Case 3: Placing an Order
o Test Case ID: TC003
o Description: Verify that an order can be placed successfully.
o Preconditions: Items must be in the cart, and the user must be logged in.
o Steps to Execute:
1. Go to the cart page.
2. Click "Proceed to Checkout".
3. Enter delivery details and payment information.
4. Confirm the order.
o Expected Outcome: Order is placed, and the user receives a confirmation message with
order details.
o Actual Outcome: (Filled during testing).
o Status: Pass/Fail.
4. Test Case 4: Invalid Payment Details
o Test Case ID: TC004
o Description: Verify the system's response to invalid payment details.
o Preconditions: Items must be in the cart.
o Steps to Execute:
1. Proceed to checkout.
2. Enter invalid payment details (e.g., expired credit card).
3. Attempt to confirm the order.
o Expected Outcome: The system rejects the payment and displays an appropriate error
message.
o Actual Outcome: (Filled during testing).
o Status: Pass/Fail.
5. Test Case 5: High Traffic Simulation
o Test Case ID: TC005
o Description: Validate system performance under high user traffic.
o Preconditions: Simulate multiple simultaneous users using load testing tools.
o Steps to Execute:
1. Simulate 500 concurrent users browsing and placing orders.
o Expected Outcome: The system maintains response times under 3 seconds, with no
crashes or errors.
o Actual Outcome: (Filled during testing).
o Status: Pass/Fail.
Tools for Testing
Use tools like JMeter for load testing.
Manual or automated testing using tools like Selenium for functional test cases.
Prototype testing using simulation software.