DEV Community

Jackson S
Jackson S

Posted on

Test Case Design Questions with Answers

Q1.You are testing a form that allows users to schedule appointments with doctors. The form has the following fields: First name, last name, email, Phone number and appointment date/time. Some more inputs:

  1. If any field is blank we should display “all fields are required”.
  2. If the email is invalid, we should display “Please enter a valid email”.
  3. If the phone number is invalid, we should display “Please enter valid phone number”.
  4. If the appointment date or time is not available, we should display, “Please choose another date or time”.
  5. If all fields are correct and appointment is available, we should display, “we should schedule the appointment successfully”.

List of conditions for Decision Table:

Test cases Conditions Mention Pass/Fail
First Name Empty All fields are required F
First Name Filled First name filled successfully P
Last Name Empty All fields are required F
Last Name Filled Last Name filled successfully P
Mail id Filled Mail id filled successfully P
Mail id Empty Please enter valid email F
Mail id If there is no @ symbol Please enter valid email F
Mail id If there is no gmail.com Please enter valid email F
Phone Number Empty Please enter valid phone number F

Phone Number <10 numbers Please enter valid phone number F
Phone Number =10 numbers Phone Number filled successfully P
Appointment date Empty Please choose date F
Appointment date >= Current date Appointment date filled successfully P
Appointment date Selected date is fully occupied Please choose another date F
Appointment Time Empty Please choose Time F
Appointment Time >= Current time Appointment time filled successfully P
Appointment Time Selected time is occupied Please choose another time F
All fields All fields are correct All fields are filled successfully P
All fields If any field is blank Please fill the mandatory fields F
Appointment Appointment is not available Please select other day/time F
Appointment Appointment is available Appointment is scheduled successfully P

Q2.You are a software Tester and assigned to test a new mobile app that has just been developed. The app has three different user roles. Basic user, premium user and Admin user. The below are following three test scenarios.

  1. Basic users can only access the limited features of the app, while premium users can access all features. Admin users have access to advanced settings and can perform all actions.
  2. Users should be able to create and delete their accounts successfully. Password must meet the required complexity standards and users should receive a confirmation email on successful account creation.
  3. Users should be able to navigate through the app seamlessly without any crashes or performance issues. The app should display appropriate error messages when a user attempts to perform an action they are not authorized to perform.

Test Plan for the above Test scenarios:

1.Test Scenario Description : Verifying the login page of Mobile application of users
1.1Test Case Description : Valid Username and valid Password
Test Steps:

  1. Open the Mobile Application
  2. Click on User
  3. Enter valid username and valid password
  4. The user login is successful
  5. The limited features of the user should be visible. Test Scenario Description : Verifying the login page of Mobile application of users

1.2Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on User
  3. Enter Invalid username and Invalid password
  4. The user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”. Test Scenario Description : Verifying the login page of Mobile application of users

1.3Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on User
  3. Enter valid username and Invalid password
  4. The user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”. Test Scenario Description : Verifying the login page of Mobile application of users

1.4Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on User
  3. Enter Invalid username and valid password
  4. The user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”.

2.Test Scenario Description : Verifying the login page of Mobile application of Pemium users
2.1Test Case Description : Valid Username and valid Password
Test Steps:

  1. Open the Mobile Application
  2. Click on Premium User
  3. Enter valid username and valid password
  4. The user login is successful
  5. The all features of the premium user should be visible. Test Scenario Description : Verifying the login page of Mobile application of premium users

2.2Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Premium User
  3. Enter Invalid username and Invalid password
  4. The Premium user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”. Test Scenario Description : Verifying the login page of Mobile application of Premium users

2.3Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Premium User
  3. Enter valid username and Invalid password
  4. The Premium user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”. Test Scenario Description : Verifying the login page of Mobile application of Premium users

2.4Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Premium User
  3. Enter Invalid username and valid password
  4. The Premium user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password

3.Test Scenario Description : Verifying the login page of Mobile application of Admin users
3.1Test Case Description : Valid Username and valid Password
Test Steps:

  1. Open the Mobile Application
  2. Click on Admin User
  3. Enter valid username and valid password
  4. The Admin user login is successful
  5. The all advanced features of the Admin user should be visible.

Test Scenario Description : Verifying the login page of Mobile application of Admin users
3.2Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Admin User
  3. Enter Invalid username and Invalid password
  4. The Admin user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”.

Test Scenario Description : Verifying the login page of Mobile application of Admin users
3.3Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Admin User
  3. Enter valid username and Invalid password
  4. The Admin user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”.

Test Scenario Description : Verifying the login page of Mobile application of Admin users
3.4Test Case Description : Invalid Username and Invalid Password.
Test Steps:

  1. Open the Mobile Application
  2. Click on Admin User
  3. Enter Invalid username and valid password
  4. The Admin user login is Unsuccessful
  5. Give a message “Please enter valid username and valid password”.

4.Test Scenario Description : Creating a account
Test Case Description : Creating a New user account by filling all mandatory fields.
Test Steps:

  1. Open the Mobile Application
  2. Click New user
  3. New user form will be visible
  4. Enter First name and Last Name
  5. Enter valid mobile Number with 10 digits
  6. Enter Valid Mail id
  7. Create Password with minimum 10 letters with special characters.
  8. Confirm Password
  9. If any field is blank sent a message “Please fill all the mandatory fields”.
  10. Once all details all correct New user account is created and confirmation mail will sent to the mailid of the user.

5.Test Scenario Description : Deleting a account
Test Case Description : Deleting a user account in a mobile application.
Test Steps:

  1. Open the Mobile Application
  2. Click Login
  3. Enter user name and Password
  4. Once Login goto settings menu
  5. Click Delete my Account
  6. Show a message that “Are you sure you want to delete your account permanently”
  7. Click yes and proceed.
  8. Your Account is deleted successfully and Mail confirmation on deletion will sent to the users mailid.

6.Test Scenario Description : User perform unauthorized actions.
Test Case Description : When a user perform unauthorized action display a message that you are not authorized to perform this action.
Test Steps:

  1. Open the Mobile Application
  2. Click Login
  3. Enter user name and Password
  4. Click main menu
  5. Copy the content
  6. Display a message that “You are not authorized to perform this action”.
  7. Click Ok.

Top comments (0)