TestCaseDesign

Q1)
The conditions are derived from the requirements:
Is the first name entered? (Yes/No)
Is the last name entered? (Yes/No)
Is the email entered and valid? (Yes/No)
Is the phone number entered? (Yes/No)
Is the appointment date/time entered? (Yes/No)
Is the appointment date/time available? (Yes/No)
Identify the outcomes
The possible actions based on the conditions are:
Display "All fields are required."
Display "Please enter a valid email."
Display "Appointment not available. Please choose another."
Schedule the appointment successfully.
Decision table by listing all possible conditions and the resulting actions.
Condition/Scenario | C1 | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 | C10 | C11 | C12 | C13 | C14 | C15 | C16 |
First Name Entered? | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Last Name Entered? | No | No | Yes | Yes | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Email Entered and Valid? | No | Yes | No | Yes | No | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Phone Number Entered? | No | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Appointment Date/Time Entered? | No | No | No | No | No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Appointment Date/Time Available? | N/A | N/A | N/A | N/A | N/A | N/A | No | No | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes |
Action: All Fields Required | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | No | No | No | No | No | No |
Action: Invalid Email | No | No | No | No | No | No | No | No | No | No | No | Yes | No | No | No | No |
Action: Appointment Not Available | No | No | No | No | No | No | Yes | Yes | No | Yes | No | No | Yes | Yes | No | No |
Action: Schedule Appointment | No | No | No | No | No | No | No | No | Yes | No | Yes | No | No | No | Yes | Yes |
Explanation of scenarios
C1–C6: One or more fields are missing. The system should display "All fields are required."
C7–C8: All fields are entered, but the appointment date/time is unavailable. The system should display "Appointment not available."
C9: All fields are entered correctly, and the appointment is available. The system should schedule the appointment successfully.
C10: All fields are entered, but the appointment date/time is unavailable. The system should display "Appointment not available."
C11–C12: All fields are correct, but the email is invalid. The system should display "Please enter a valid email."
C13–C16: Various valid/invalid combinations where the email or availability determines the outcome.
Q2)
Scenario 1: Testing Access Based on User Roles
- Objective: Ensure the app enforces correct access permissions for basic, premium, and admin users.
Test Steps:
Basic User Access:
Log in as a basic user.
Attempt to access limited features (e.g., view-only sections, restricted tools).
Attempt to access premium features and advanced settings.
Premium User Access:
Log in as a premium user.
Attempt to access all features of the app.
Attempt to access advanced settings reserved for admin users.
Admin User Access:
Log in as an admin user.
Attempt to access all features, including advanced settings.
Attempt actions like managing other users, viewing logs, or updating configurations.
Test for unauthorized actions:
- As each user type, try performing an action that is not authorized (e.g., basic user trying to access premium content).
Expected Results:
Basic users can only access limited features and are denied access to premium features and advanced settings with an appropriate error message like: "You do not have access to this feature. Upgrade your account to unlock more features."
Premium users can access all features except admin-level settings. Unauthorized actions should display a clear error message: "This action is restricted to admin users."
Admin users can access all features and perform all actions.
Additional Considerations:
Ensure error messages are consistent and user-friendly.
Verify that unauthorized attempts do not cause the app to crash.
Scenario 2: Testing Account Creation, Deletion, and Password Standards
- Objective: Ensure users can successfully create and delete accounts, passwords meet complexity standards, and confirmation emails are sent upon successful account creation.
Test Steps:
Account Creation:
Attempt to create an account with:
A valid email and password that meets the complexity standards (e.g., minimum 8 characters, mix of uppercase, lowercase, numbers, special characters).
A weak password (e.g., "12345") and check for rejection with an appropriate error message.
A missing or invalid email (e.g., "user@com") and check for rejection.
Verify that a confirmation email is sent upon successful account creation.
Account Deletion:
Log in with an existing account.
Navigate to the account settings and delete the account.
Verify that the account is deleted successfully and that the user can no longer log in with the same credentials.
Password Standards:
Test password validation rules, including:
Minimum/maximum length requirements.
Presence of special characters, numbers, and uppercase/lowercase letters.
Expected Results:
Account creation succeeds with valid inputs and a confirmation email is sent with a message like: "Your account has been successfully created. Please check your email to confirm your registration."
Account creation fails for invalid inputs with clear error messages (e.g., "Password must include at least 8 characters, a number, and a special character.").
Account deletion removes the user data and prevents further login.
Password validation works as per the standards, and invalid passwords are rejected with appropriate messages.
Additional Considerations:
Check the email's spam folder to ensure confirmation emails aren't flagged as spam.
Verify that accounts are not created or deleted twice due to race conditions or errors.
Scenario 3: Testing App Navigation and Performance
- Objective: Ensure seamless navigation, no crashes, and appropriate error handling for unauthorized actions.
Test Steps:
App Navigation:
Log in as a user (basic, premium, or admin).
Navigate through all app features and settings.
Check for responsiveness, load times, and any UI/UX glitches.
Performance Testing:
Stress-test the app by navigating quickly, performing multiple actions simultaneously, or opening multiple instances.
Test on different devices and operating systems to check compatibility.
Error Messages:
Attempt unauthorized actions (e.g., basic user accessing premium content).
Disconnect the internet and try performing an action to check offline behavior.
Input invalid data in forms and observe error handling.
Expected Results:
App navigation is smooth, with no crashes or performance degradation.
Pages load quickly, and the UI is responsive across devices.
Unauthorized actions display clear error messages (e.g., "Feature unavailable for your account type.").
Offline actions show appropriate warnings or suggestions (e.g., "You are offline. Please reconnect to continue.").
Invalid inputs are flagged immediately with detailed error messages.
Additional Considerations:
Test app navigation in both portrait and landscape modes.
Use a performance monitoring tool to track memory usage and load times.
Log and report crashes with detailed steps to reproduce.
Subscribe to my newsletter
Read articles from Rithika Subash directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
