Skip to content

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 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 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
14 :-------------: :-------------: :-------------: :-------------: :-------------:
15 :-------------: :-------------: :-------------: :-------------: :-------------:
16 :-------------: :-------------: :-------------: :-------------: :-------------:
17 :-------------: :-------------: :-------------: :-------------: :-------------:
18 :-------------: :-------------: :-------------: :-------------: :-------------:
19 :-------------: :-------------: :-------------: :-------------: :-------------:
20 :-------------: :-------------: :-------------: :-------------: :-------------:
21 :-------------: :-------------: :-------------: :-------------: :-------------:
22 :-------------: :-------------: :-------------: :-------------: :-------------:
23 :-------------: :-------------: :-------------: :-------------: :-------------:
24 :-------------: :-------------: :-------------: :-------------: :-------------:
25 :-------------: :-------------: :-------------: :-------------: :-------------:
26 :-------------: :-------------: :-------------: :-------------: :-------------:
27 :-------------: :-------------: :-------------: :-------------: :-------------:
28 :-------------: :-------------: :-------------: :-------------: :-------------:
29 :-------------: :-------------: :-------------: :-------------: :-------------:
30 :-------------: :-------------: :-------------: :-------------: :-------------:
31 :-------------: :-------------: :-------------: :-------------: :-------------:
32 :-------------: :-------------: :-------------: :-------------: :-------------:
33 :-------------: :-------------: :-------------: :-------------: :-------------:
34 :-------------: :-------------: :-------------: :-------------: :-------------:
35 :-------------: :-------------: :-------------: :-------------: :-------------:
36 :-------------: :-------------: :-------------: :-------------: :-------------:
37 :-------------: :-------------: :-------------: :-------------: :-------------:
38 :-------------: :-------------: :-------------: :-------------: :-------------:
39 :-------------: :-------------: :-------------: :-------------: :-------------:
40 :-------------: :-------------: :-------------: :-------------: :-------------:

Clone this wiki locally