Uncategorized – Programmerbay https://programmerbay.com A Tech Bay for Tech Savvy Sat, 21 Sep 2019 16:24:10 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://programmerbay.com/wp-content/uploads/2019/09/cropped-without-transparent-32x32.jpg Uncategorized – Programmerbay https://programmerbay.com 32 32 Design the test cases and test the program of Previous Date problem by using Robustness Testing https://programmerbay.com/design-the-test-cases-and-test-the-program-of-previous-date-problem-by-using-robustness-testing/ https://programmerbay.com/design-the-test-cases-and-test-the-program-of-previous-date-problem-by-using-robustness-testing/#respond Fri, 20 Sep 2019 06:50:35 +0000 https://programmerbay.com/?p=5254 In previous date problem, we will test our code using Robustness Testing to check whether it can provide expected the previous date as an output or not. We are considering interval [2000,2050]  for year, [1,31] days for date, [1,12] for month. If we look closely, we require to figure out for given year input whether it is a leap year or not.

We will be using Robustness Testing to generate test cases.  The expected output can be  [Invalid input, Invalid date, previous Date].

Program

Here is the “previous date problem” program along with its tested test cases.

Robustness Testing

So, there will be 6N+ 1 test cases that is 6*3 +1 =19 in this case as we are using Robustness Testing.

Test IDDateMonthYearExpected OutputProgram OutputTest Outcome
1062025Invalid InputInvalid InputPass
216202531-5-202531-5-2025Pass
32620251-6-20151-6-2015Pass
4306202529-6-201529-6-2015Pass
53162025Invalid DateInvalid DatePass
63262025Invalid InputInvalid InputPass
71502025Invalid InputInvalid InputPass
8151202514-1-202514-1-2025Pass
9152202514-2-202514-2-2025Pass
101511202514-11-202514-11-2025Pass
111512202514-12-202514-12-2025Pass
1215132025Invalid InputInvalid InputPass
13 1561999Invalid InputInvalid InputPass
14156200014-6-200014-6-2000Pass
15156200114-2-200114-2-2001Pass
16156204914-6-204914-6-2049Pass
17156205014-6-205014-6-2050Pass
181562051Invalid InputInvalid InputPass
19156202514-6-202514-6-2025Pass

 

]]>
https://programmerbay.com/design-the-test-cases-and-test-the-program-of-previous-date-problem-by-using-robustness-testing/feed/ 0