If you’re curious to see the “Triangle Problem “ code, then the link is here with tested test cases.
In Decision table based testing, Condition stubs and Action stubs are viewed as inputs and outputs. Here, we’ll be applying this Structural testing technique to create test cases:
Let’s create the decision table first,
On the basis of above decision table, we have these test cases for testing:
Test ID | a | b | c | Expected Output | Program Output | Tested Outcome |
---|---|---|---|---|---|---|
1 | 5 | 10 | 5 | Not a triangle | Not a triangle | Pass |
2 | 10 | 5 | 5 | Not a triangle | Not a triangle | Pass |
3 | 5 | 5 | 10 | Not a triangle | Not a triangle | Pass |
4 | 10 | 9 | 5 | Scalene triangle | Scalene triangle | Pass |
5 | 5 | 1 | 5 | Isosceles triangle | Isosceles triangle | Pass |
6 | 1 | 5 | 5 | Isosceles triangle | Isosceles triangle | Pass |
7 | - | - | - | Not Possible | Not Possible | |
8 | 5 | 5 | 1 | Isosceles triangle | Isosceles triangle | Pass |
9 | - | - | - | Not Possible | Not Possible | |
10 | - | - | - | Not Possible | Not Possible | |
11 | 5 | 5 | 5 | Equilateral Triangle | Equilateral Triangle | Pass |