What are the test cases for a triangle?

Questions by ramaraogoud   answers by ramaraogoud

Showing Answers 1 - 12 of 12 Answers

goksn

  • May 31st, 2009
 

1. Check there are only three sides.
2. Check whether square one of the sides is equivalent of sum of square of other two sides. (a^2+b^2=c^2)
3. Check whether all the sides are in different direction.
4. Check two sides cuts perpendicular
5. Check all the sides are connected (there must be three connection points)
6. Check that no sides are parallel.

The above said test cases are for right angled triangle and not for equilateral or isosceles triangle.
For equilateral and isosceles triangle, test cases 2 and 4 will not suit.

Test Cases

1. Check whether the triangle has got only 3 sides or 3 values
2. Check whether the sum of any 2 sides is equal or greater than that of other side

  Was this answer useful?  Yes

There is not enough information to create a complete test suite.  I would ask the Business Analyst or Project Manager the following questions before I begin authoring test cases:

1) Is there any validation performed on the text boxes?  Will a message appear if users enter alpha or special characters (Examples: a-z, A-Z, !@#$) into the text boxes?
 
2) Is there a size limit on the number of characters the text boxes can accommodate?

3) Is there an upper limit on the numeric value that the program will accept?

4) How does the program handle zero (0)?  What message occurs?

5) How will the dialog message appear in each case for scalene, isosceles, and equilateral?  What is the specific message?

6) Is there any text in the dialog prior to user input?

I would author only the following test cases until I receive answers to the previous questions:

Test Case Titles
TC1: Submit with three equal values
TC2: Submit with three different values
TC3: Submit with values where two sides are equal
TC4: Submit with a value of zero
TC4: Submit with no data
TC4: Submit with alpha characters
TC5: Submit with special characters

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions