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 ID | a | b | c | Expected Output | Program Output | Tested Outcome |
---|---|---|---|---|---|---|
1 | 0 | 5 | 5 | Invalid Input | Invalid Input | Pass |
2 | 1 | 5 | 5 | Isosceles | Isosceles | Pass |
3 | 2 | 5 | 5 | Isosceles | Isosceles | Pass |
4 | 9 | 5 | 5 | Isosceles | Isosceles | Pass |
5 | 10 | 5 | 5 | Not a Triangle | Not a Triangle | Pass |
6 | 11 | 5 | 5 | Invalid Input | Invalid Input | Pass |
7 | 5 | 0 | 5 | Invalid Input | Invalid Input | Pass |
8 | 5 | 1 | 5 | Isosceles | Isosceles | Pass |
9 | 5 | 2 | 5 | Isosceles | Isosceles | Pass |
10 | 5 | 9 | 5 | Isosceles | Isosceles | Pass |
11 | 5 | 10 | 5 | Not a Triangle | Not a Triangle | Pass |
12 | 5 | 11 | 5 | Invalid Input | Invalid Input | Pass |
13 | 5 | 5 | 0 | Invalid Input | Invalid Input | Pass |
14 | 5 | 5 | 1 | Isosceles | Isosceles | Pass |
15 | 5 | 5 | 2 | Isosceles | Isosceles | Pass |
16 | 5 | 5 | 9 | Isosceles | Isosceles | Pass |
17 | 5 | 5 | 10 | Not a Triangle | Not a Triangle | Pass |
18 | 5 | 5 | 11 | Invalid Input | Invalid Input | Pass |
19 | 5 | 5 | 5 | Equilateral | Equilateral | Pass |