This document outlines test cases designed to ensure the smooth functionality of the Travel Planner application. Each test case includes its unique identifier, description, test steps, and expected results. It also outlines the test coverage achieved for each module.
UI: 55.12%
Flask Backend: 60%
Test Case ID: TC001
Description: Attempt to sign up with an email already registered.
Test Steps:
- Navigate to the Signup page.
- Enter an already registered email.
- Fill in the password and confirm password fields.
- Click "Sign Up."
Expected Result: Error message: "User already exists. Please try with a different email."
Test Case ID: TC002
Description: Attempt to sign up with different passwords in the password and confirm password fields.
Test Steps:
- Navigate to the Signup page.
- Enter a valid email.
- Enter different values in the password and confirm password fields.
- Click "Sign Up."
Expected Result: Error message: "Please fill all fields correctly or ensure passwords match."
Test Case ID: TC003
Description: Successfully sign up with valid credentials.
Test Steps:
- Navigate to the Signup page.
- Enter a valid email, matching passwords, and required details.
- Click "Sign Up."
Expected Result: User account created successfully, and the user is redirected to the dashboard.
Test Case ID: TC004
Description: Attempt to log in with a valid email but an incorrect password.
Test Steps:
- Navigate to the Login page.
- Enter a registered email and an incorrect password.
- Click "Login."
Expected Result: Error message: "Invalid credentials. Please check your password."
Test Case ID: TC005
Description: Attempt to log in with valid credentials.
Test Steps:
- Navigate to the Login page.
- Enter a registered email and the correct password.
- Click "Login."
Expected Result: User successfully logs in and is redirected to the dashboard.
Test Case ID: TC006
Description: Application fails to connect to the database.
Test Steps:
- Simulate database downtime.
- Attempt to log in or access features requiring the database.
Expected Result: Error message: "Service unavailable. Please try again later."
Test Case ID: TC007
Description: Simulate Spring application server downtime.
Test Steps:
- Stop the Spring application server.
- Attempt to access any Spring-based service.
Expected Result: Application shows "Error: Could not connect to the server."
Test Case ID: TC008
Description: Simulate Flask application server downtime.
Test Steps:
- Stop the Flask application server.
- Attempt to access any Flask-based service.
Expected Result: Application shows "Error: Could not connect to the server."
Test Case ID: TC009
Description: Generate and save an itinerary.
Test Steps:
- Log in to the application.
- Provide trip details (destination, duration, preferences).
- Generate and save the itinerary.
Expected Result: Itinerary successfully generated and saved.
Test Case ID: TC010
Description: Generate a packing list and mark items as packed.
Test Steps:
- Log in to the application.
- Provide trip details for packing list generation.
- Generate the packing list.
- Mark some or all items as packed.
Expected Result: Packing list successfully generated, and items marked as packed are displayed accordingly.
Test Case ID: TC011
Description: Access and view statistics on the admin dashboard.
Test Steps:
- Log in as an admin.
- Navigate to the admin dashboard.
Expected Result: Dashboard displays user statistics, trip counts, popular destinations, and system health metrics.
Test Case ID: TC012
Description: Calculate long weekends using the Long Weekend Calculator.
Test Steps:
- Open the Long Weekend Calculator.
- Select a month and year.
Expected Result: Long weekends are highlighted based on holidays and weekends.