robustness testing – Programmerbay https://programmerbay.com A Tech Bay for Tech Savvy Sun, 06 Dec 2020 13:55:35 +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 robustness testing – Programmerbay https://programmerbay.com 32 32 Design test cases and test the program of Quadratic Equation problem using Robustness testing https://programmerbay.com/design-the-test-cases-and-test-the-program-of-quadratic-equation-problem-by-using-robustness-testing/ https://programmerbay.com/design-the-test-cases-and-test-the-program-of-quadratic-equation-problem-by-using-robustness-testing/#respond Sat, 19 Sep 2020 12:49:06 +0000 https://programmerbay.com/?p=5210 An equation is said to be a quadratic equation if only if it is in the form of ax2+bx+c where a can’t be 0. We will use the Quadratic formula for calculating the roots to check whether they are imaginary or real.

quadratic formula 1

This Quadratic formula is used only when b2– 4ac >= 0. such that, If b2– 4ac > 0 , means the equation has more than one real roots if b2– 4ac = 0 , means equal or single root if b2– 4ac <0, i3mplies imaginary root Lastly, if a is 0, then the equation would not be counted as a quadratic equation.

So, a quadratic equation can have [ Real, Equal, Imaginary, not quadratic ]

Program

Check out “Quadratic Equation” program along with its tested test cases.

Robustness Testing

We are assuming interval [0,10] where our input values will come in between and we will create test cases using Robustness testing accordingly.

In Robustness Testing, it will produce 6N+1 test cases which means, in this case, there will be 6*3+1 = 19 test cases.

Test IDabcExpected OutputProgram OutputTested Outcome
1-155Invalid InputInvalid InputPass
2055Not QuadraticNot QuadraticPass
3155RealRealPass
4955ImaginaryImaginaryPass
51055ImaginaryImaginaryPass
61155Invalid InputInvalid InputPass
75-15Invalid InputInvalid InputPass
8505ImaginaryImaginaryPass
9515ImaginaryImaginaryPass
10595ImaginaryImaginaryPass
115105EqualEqualPass
125115Invalid InputInvalid InputPass
1355-1Invalid InputInvalid InputPass
14550RealRealPass
15551RealRealPass
16559ImaginaryImaginaryPass
175510ImaginaryImaginaryPass
185511Invalid InputInvalid InputPass
19555ImaginaryImaginaryPass

How it is different from Boundary Value Analysis?

We can observe that previously we didn’t check for input values higher than the maximum boundary limit and lesser than the minimum boundary limit. In other words, we haven’t tested our code for Invalid Inputs in Boundary Value Analysis but in Robustness testing, we did make test cases for invalid inputs too and rewrite the code to fulfill this condition.

 

]]>
https://programmerbay.com/design-the-test-cases-and-test-the-program-of-quadratic-equation-problem-by-using-robustness-testing/feed/ 0
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
Design the test cases and test the program of Triangle problem by using Robustness Testing https://programmerbay.com/design-the-test-cases-and-test-the-program-of-triangle-problem-by-using-robustness-testing/ https://programmerbay.com/design-the-test-cases-and-test-the-program-of-triangle-problem-by-using-robustness-testing/#respond Thu, 19 Sep 2019 18:24:35 +0000 https://programmerbay.com/?p=5234 A polygon with 3 sides having any of the side greater than the sum of its other two sides cannot be considered as triangle. On the basis of sides, a triangle can be categorized in isosceles, equilateral and scalene triangle.

An isosceles triangle is a triangle in which two sides are equal.

An equilateral triangle is a triangle in which all sides are equal.

A scalene triangle is a triangle in which no two sides are equivalent to one other.

Program:

Here you can find  “Triangle problem” program along with its tested output.

Robustness Testing

We are assuming interval [1,10] for creating test cases and we will generate test cases using Robustness testing accordingly.

In Robustness Testing, 6N+1 test cases will be generated, which means, in this case, 6*3+1 = 19 test cases.

Test IDabcExpected OutputProgram OutputTested Outcome
1055Invalid InputInvalid InputPass
2155IsoscelesIsoscelesPass
3255IsoscelesIsoscelesPass
4955IsoscelesIsoscelesPass
51055Not a TriangleNot a TrianglePass
61155Invalid InputInvalid InputPass
7505Invalid InputInvalid InputPass
8515IsoscelesIsoscelesPass
9525IsoscelesIsoscelesPass
10595IsoscelesIsoscelesPass
115105Not a TriangleNot a TrianglePass
125115Invalid InputInvalid InputPass
13550Invalid InputInvalid InputPass
14551IsoscelesIsoscelesPass
15552IsoscelesIsoscelesPass
16559IsoscelesIsoscelesPass
175510Not a TriangleNot a TrianglePass
185511Invalid InputInvalid InputPass
19555EquilateralEquilateralPass

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