-
Notifications
You must be signed in to change notification settings - Fork 0
Test Cases
Setthanat Kladee edited this page Oct 21, 2021
·
47 revisions
| Test ID | Test Case Name | Description | Expected Result | Actual Result | Status |
|---|---|---|---|---|---|
| 1 | calulate user's age of user who was born on 10 Oct 2000 | Calculate the age from the date of the person (calculate in the year 2021) | The function should calculate the age correctly and return 21 | Same as expected result | ✔️ |
| 2 | calulate user's age of user who was born on 31 Dec 2000 | Calculate the age from the date of the person (calculate in the year 2021) | The function should calculate the age correctly and return 20 | Same as expected result | ✔️ |
| 3 | calulate user's age of user who was born today on year 2000 | Calculate the age from the date of the person which dates passed for 1 year (calculate in the year 2021) | The function should calculate the age correctly and return 21 | Same as expected result | ✔️ |
| 4 | calulate user's age of user who was born on 1 Jan this year | Calculate the age from the date of the person which dates not passed for 1 year yet (calculate in the year 2021) | The function should calculate the age correctly and return 0 | Same as expected result | ✔️ |
| 5 | calulate user's age of user who was born in the future | Calculate the age from the date of the person which dates is the future dates (calculate in the year 2021) | The function must throw an error message "you are using invalid date" | The function did not throw an error message | ❌ |
| 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 result | ✔️ |
| 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 wrong date format" | The function did not throw an error message | ❌ |
| 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 wrong date format" | The function did not throw an error message | ❌ |
| 9 | calulate user's age with format yyyy-mm-dd | Calculate the age from the date of the person which date is in a different format (calculate in the year 2021) | The function must throw an error message "you are using wrong date format" | The function did not throw an error message | ❌ |
| 10 | calulate user's age of user who was born on day 0 | Calculate the age from the date of the person which date is 0 (calculate in the year 2021) | The function must throw an error message "you are using invalid date" | The function did not throw an error message | ❌ |
| 11 | calulate user's age of user who was born on day -1 | Calculate the age from the date of the person which date is a negative value (calculate in the year 2021) | The function must throw an error message "you are using invalid date" | The function did not throw an error message | ❌ |
| 12 | calulate user's age with no '-' format | Calculate the age from the date of the person which dates not include '-' in the format (calculate in the year 2021) | The function must throw an error message "you are using wrong date format" | The function did not throw an error message | ❌ |
| 13 | calulate user's age with '/' format | Calculate the age from the date of the person which dates include '/' in the format (calculate in the year 2021) | The function must throw an error message "you are using wrong date format" | The function did not throw an error message | ❌ |
| 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" | The function did not throw an error message | ❌ |
| 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" | The function did not throw an error message | ❌ |
| 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. | We got JSON object which contains wrong date format | ❌ |
| 17 | check JSON have all require field(eventhough value is undefine) | Despite the GOV sending some incorrect data in an array, we still get the JSON object which contains all the important keys | A JSON object which contains all keys. | The JSON object does not contain the reservation_id key. |
❌ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 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 '20-10-2000' |
The JSON object["date"] is "2000-10-20" which is wrong format | ❌ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 27 | check modify invalid date format | Modifying the date with format "01234-12233-200000000" to accepted format | The date with format "200000000/12233/01234" | Same as expected result | ✔️ |
| 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 result | ✔️ |
| 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 result | ✔️ |
| 30 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 31 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 32 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 33 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 34 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 35 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 36 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 37 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 38 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 39 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
| 40 | :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |