# Task 2: Test Case Design Techniques

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

### If any field is blank, we should display "All fields are required"

### If the email is invalid, we should display "Please enter a valid email"

### If the phone number is invalid, we should display "Please enter a valid phone number"

### If the appointment date/time is not available, it should display "Please choose another date/time"

### If all fields are correct and the appointment is available, we should schedule the appointment successfully.

### For these requirements write down the correct list of conditions in the form of decision table

Ans:  
Here's a decision table that outlines the conditions for the given requirements:

| **First Name** | **Last Name** | **Email Validation** | **Phone Validation** | **Appointment Availability** | **Expected Result** |
| --- | --- | --- | --- | --- | --- |
| \- | T | T | T | T | "All fields are required" |
| T | \- | T | T | T | "All fields are required" |
| T | T | F | T | T | "Please enter a valid email" |
| T | T | T | F | T | "Please enter a valid phone number" |
| T | T | T | T | F | "Please choose another date/time" |
| T | T | T | T | T | Schedule the appointment successfully |

### 2)Suppose you are a software tester and you are 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. You have been given the following three test scenarios to execute:

### \--&gt;Basic users can only access limited features of the app, while premium users can access all features. Admin users have access to advanced settings and can perform all actions.

### \--&gt;Users should be able to create and delete their accounts successfully. Passwords must meet the required complexity standards and users should receive a confirmation email upon successful account creation.

### \--&gt;Users should be able to navigate through the app seamlessly without any crashes or performance issues. The app should also display appropriate error messages when a user attempts to perform an action they are not authorized to perform.

### For each of the test scenarios, describe the steps you would take to test them and the expected results.

### Ans:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706250178189/4d47fa55-ced8-457c-9876-e9e6252e1f19.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706250211943/a9d2ba31-dab4-429a-b52f-2f8ac2e5cfd0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706250244177/b7a261a1-12ce-4b6b-948f-d72303ff3314.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1706250268820/82131194-06aa-43d1-a9e9-b41fca34e614.png align="center")
