The user is expected to enter an integer value into each of the three text fields. Upon hitting the OK button the program will print a message in a separate dialog box stating whether the triangle is scalene (all sides are different lengths), isosceles (two sides are the same length), or equilateral (all three sides are the same length). Write a set of test cases (i.e. specific sets of data) that you feel would adequately test this program. Write the tests so that someone other than you can run them.

Questions by kpworld

Showing Answers 1 - 6 of 6 Answers

kamatchi

  • Sep 26th, 2007
 

Three different sets of values should be chosen.
Each set should be entered separately
For eg:
First data set(7,8,9)
Second data set(9,9,8)-isosceles triangle
Third data set(9,9,9)-equilateral triangle


Test case for first data set:
Enter the data (A,B,C) in to the fields-the data should be displayed in the appropriate fields
Check whether
1. A#B#C and click "ok" button. The dialog box should be displayed as "scalene triangle"
2. A=B#C and click "ok" button. The dialog box should be displayed as "Isoceles Triangle
3. A=B=C and click "ok" button. The dialog box should be displayed as "Eqilateral Triangle".


  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?

Prerequisites:
1) Test Cases will be labeled TC. For example, Text Case 1 = TC1.
2) Text Boxes will be labeled TB. For example, Text Box 1 = TB1.
3) The equal sign means 'gets'.  For example, TB1=3 means text box 1 gets the number 3.  Enter the number 3 in this text box.
4) The dialog text may vary from test case description.  Please make sure the text reflects the proper type of triangle. 

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

Test Case Titles
TC1: TB1=1, TB2=2, TB3=3; click ok; dialog reflects 'scalene'
TC2: TB1=5, TB2=8, TB3=5; click ok; dialog reflects 'isosceles'
TC3: TB1=7, TB2=7, TB3=7; click ok; dialog reflects 'equilateral'

TC4: TB1=75, TB2=87, TB3=92; click ok; dialog reads 'scalene'
TC5: TB1=31, TB2=45, TB3=45; click ok; dialog reads 'isosceles'
TC6: TB1-60, TB2-60, TB3=60; click ok; dialog reads 'equilateral'

TC7: TB1=794, TB2=1073, TB3=652; click ok; dialog reads 'scalene'
TC8: TB1=983, TB2=983, TB3=2983; click ok; dialog reads 'isosceles'
TC9: TB1=729, TB2=729, TB3=729; click ok; dialog reads 'equilateral'

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