-
Notifications
You must be signed in to change notification settings - Fork 0
Test Cases
Setthanat Kladee edited this page Oct 23, 2021
·
47 revisions
| Test ID | Test Case Name | Description | Expected Result | Actual Result | Status |
|---|---|---|---|---|---|
| 1 | calculate user's age for user who was born on 10 Oct 2000 | Calculate age from person birthdate(calculate in the year 2021) | The function should calculate the age correctly and return 21 | Same as expected | ✔️ |
| 2 | calculate user's age for user who was born on 31 Dec 2000 | Calculate age from person birthdate(calculate in the year 2021) | The function should calculate the age correctly and return 20 | Same as expected | ✔️ |
| 3 | calulate user's age for user who was born today on year 2000 | Calculate age of user who was born today back in year 2000 | The function should calculate the age correctly and return 21 | Same as expected | ✔️ |
| 4 | calulate user's age of user who was born on 1 Jan this year | Calculate age of baby who was born this year on 1st of Jan | The function should calculate the age correctly and return 0 | Same as expected | ✔️ |
| 5 | calulate user's age of user who was born in the future | Calculate age of user who will born in the future | The function must throw an error message "you are using invalid date" | Same as expected | ✔️ |
| 6 | calulate user's age with date 01 (have zero in front) | Calculate the age from the date of the person which date is in abnormal format (calculate in the year 2021) | The function should calculate the age correctly and return 21 | Same as expected | ✔️ |
| 7 | calulate user's age of user who was born in 'July' | Calculate the age from the date of the person which month is in the wrong format (calculate in the year 2021) | The function must throw an error message "you are using invalid date format" | Same as expected | ✔️ |
| 8 | calulate user's age with empty string | Calculate the age from the date of the person which date is empty (calculate in the year 2021) | The function must throw an error message "you are using invalid date format" | Same as expected | ✔️ |
| 9 | calulate user's age with format dd-mm-yyyy | Calculate age from date that is in the different format | The function must throw an error message "you are using invalid date format" | Same as expected | ✔️ |
| 10 | calulate user's age of user who was born on day 0 | Calculate age with birthdate 0 | The function must throw an error message "you are using invalid date" | Same as expected | ✔️ |
| 11 | calulate user's age of user who was born on day -1 | Calculate age with negative birthdate | The function must throw an error message "you are using invalid date" | Same as expected | ✔️ |
| 12 | calulate user's age with no '-' format | Calculate age from the date of the person which dates not include '-' in the format | The function must throw an error message "you are using invalid date format" | Same as expected | ✔️ |
| 13 | calulate user's age with '/' format | Calculate age from the date of the person which dates include '/' in the format | The function must throw an error message "you are using invalid date format" | Same as expected | ✔️ |
| 14 | calulate user's age with invalid month | Calculate the age from the date of the person which month is invalid (calculate in the year 2021) | The function must throw an error message "you are using invalid date" | Same as expected | ✔️ |
| 15 | calulate user's age with invalid date | Calculate the age from the date of the person which date is invalid (calculate in the year 2021) | The function must throw an error message "you are using invalid date" | Same as expected | ✔️ |
| 16 | check JSON have correct key&value | The convertGovJson should generate JSON data from the given array correctly | A JSON object which contains information from GOV array. | Same as expected | ✔️ |
| 17 | cancel | - | - | - | - |
| 18 | check JSON has valid reservation_id format | Check when we generate the JSON object from the normal_young_user have the correct reservation_id format |
The JSON object as the output which contains correctly reservation_id format and has value 1 |
Same as expected | ✔️ |
| 19 | check JSON has valid timestamp format | Check when we generate the JSON object from the normal_young_user have the correct timestamp format |
The JSON object as the output which contains correctly timestamp format and has value 2021-10-20T15:19:56.609000 |
Same as expected | ✔️ |
| 20 | check JSON has valid name format | Check when we generate the JSON object from the normal_young_user have the correct valid name format |
The JSON object as the output which contains correctly valid name format and has the value "Joel" |
Same as expected | ✔️ |
| 21 | check JSON has valid surname format | Check when we generate the JSON object from the normal_young_user have the correct valid surname format |
The JSON object as the output which contains correctly valid surname format and has the value "Miller" |
Same as expected | ✔️ |
| 22 | check JSON has valid date format | Check when we generate the JSON object from the normal_young_user have the correct date format |
The JSON object as the output which contains correctly date format and has the value '2000-10-20' |
Same as expected | ✔️ |
| 23 | check JSON has valid id format | Check when we generate the JSON object from the normal_young_user have the correct id format |
The JSON object as the output which contains correctly id format and has the value "1234567890123" |
Same as expected | ✔️ |
| 24 | check JSON has valid occupation format | Check when we generate the JSON object from the normal_young_user have the correct occupation format |
The JSON object as the output which contains correctly occupation format and has the value "Teacher" |
Same as expected | ✔️ |
| 25 | check JSON has valid address format | Check when we generate the JSON object from the normal_young_user have the correct address format |
The JSON object as the output which contains correctly address format and has the value "Kasetsart University" |
Same as expected | ✔️ |
| 26 | check modify normal date format | Modifying the date format to replace '/' instead '-' | The new format date from "10-20-2000" to "2000/20/10" | Same as expected | ✔️ |
| 27 | cancel | - | - | - | - |
| 28 | check number of element in list | Check the number of elements in the list of people | We should count the number of elements as 2 | Same as expected | ✔️ |
| 29 | check user order | Check that each element in the list are in order | Array with the 2 JSON objects which each object is in order | Same as expected | ✔️ |
| 30 | set priority for normal young user | Set the priority for the normal_young_user(non-doctor or nurse) appropriately |
The normal_young_user should be prioritized in level 3 |
Same as expected | ✔️ |
| 31 | set priority for normal old user | Set the priority for the normal_old_user(older than 60 and non-doctor or nurse) appropriately |
The normal_old_user should be prioritized in level 2 |
Same as expected | ✔️ |
| 32 | set priority for young Nurse (Nurse with caps 'N') | Set the priority for the young_Nurse appropriately |
The setPriorityPerson function must set the priority of young_Nurse to be 1 |
Same as expected | ✔️ |
| 33 | set priority for young nurse | Set the priority for the young_nurse appropriately |
The setPriorityPerson function must set the priority of young_nurse to be 1 |
Same as expected | ✔️ |
| 34 | set priority for young Doctor(Doctor with 'D') | Set the priority for the young_Doctor appropriately |
The setPriorityPerson function must set the priority of young_Doctor to be 1 |
Same as expected | ✔️ |
| 35 | set priority for young doctor | Set the priority for the young_doctor appropriately |
The setPriorityPerson function must set the priority of young_doctor to be 1 |
Same as expected | ✔️ |
| 36 | set priority for old doctor | Set the priority for the old_doctor(older than 60) appropriately |
The old_doctor should be prioritized in level 1 |
Same as expected | ✔️ |
| 37 | set priority for old nurse | Set the priority for the old_nurse(older than 60) appropriately |
The old_nurse should be prioritized in level 1 |
Same as expected | ✔️ |
| 38 | set priority for exact 60 user | Set the priority of the normal_user who exact 60 years old |
The normal_user who exact 60 years old must be prioritized in level 3 |
Same as expected | ✔️ |
| 39 | set priority for exact 61 user | Set the priority of the normal_user who exact 61 years old |
The normal_user who exact 61 years old must be prioritized in level 2 |
Same as expected | ✔️ |
| 40 | set priority for exact 59 user | Set the priority of the normal_user who exact 59 years old |
The normal_user who exact 59 years old must be prioritized in level 3 |
Same as expected | ✔️ |