TestCaseDesign

Rithika SubashRithika Subash
7 min read

Q1)

The conditions are derived from the requirements:

  1. Is the first name entered? (Yes/No)

  2. Is the last name entered? (Yes/No)

  3. Is the email entered and valid? (Yes/No)

  4. Is the phone number entered? (Yes/No)

  5. Is the appointment date/time entered? (Yes/No)

  6. Is the appointment date/time available? (Yes/No)


Identify the outcomes

The possible actions based on the conditions are:

  1. Display "All fields are required."

  2. Display "Please enter a valid email."

  3. Display "Appointment not available. Please choose another."

  4. Schedule the appointment successfully.

Decision table by listing all possible conditions and the resulting actions.

Condition/ScenarioC1C2C3C4C5C6C7C8C9C10C11C12C13C14C15C16
First Name Entered?NoNoNoNoYesYesYesYesYesYesYesYesYesYesYesYes
Last Name Entered?NoNoYesYesNoNoYesYesYesYesYesYesYesYesYesYes
Email Entered and Valid?NoYesNoYesNoYesNoYesYesYesYesYesYesYesYesYes
Phone Number Entered?NoNoNoNoNoNoNoYesYesYesYesYesYesYesYesYes
Appointment Date/Time Entered?NoNoNoNoNoNoYesYesYesYesYesYesYesYesYesYes
Appointment Date/Time Available?N/AN/AN/AN/AN/AN/ANoNoYesNoYesYesYesYesYesYes
Action: All Fields RequiredYesYesYesYesYesYesYesNoNoNoNoNoNoNoNoNo
Action: Invalid EmailNoNoNoNoNoNoNoNoNoNoNoYesNoNoNoNo
Action: Appointment Not AvailableNoNoNoNoNoNoYesYesNoYesNoNoYesYesNoNo
Action: Schedule AppointmentNoNoNoNoNoNoNoNoYesNoYesNoNoNoYesYes

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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:

  1. 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.

  2. 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.

  3. 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:

  1. 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.

  2. 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.

  3. 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.


0
Subscribe to my newsletter

Read articles from Rithika Subash directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rithika Subash
Rithika Subash