Test Case Design Examples
Test Case Design Examples
Test Case Design Examples
2). what are the test cases for one Rupees Coin Box (Telephone box)?
Positive test cases:
TC1: Pick up the Handset
Expected: Should display the message " Insert one rupee coin"
TC2: Insert the coin
Expected: Should display the message " Dial the Number"
TC3: When you get a busy tone, hang-up the receiver
Expected: The inserted one rupee coin comes out of the exit door.
TC4: Finish off the conversation and hang-up the receiver
Expected: The inserted coin should not come out.
TC5: During the conversation, in case of a local call, (assume the duration is of 60
sec), when 45 as are completed
Expected: It should prompt you to insert another coin to continue by giving beeps.
TC6: In the above scenario, if another coin is inserted
Expected: 60 sec will be added to the counter.
TC7: In the TC5 scenario, if you don't insert one more coin.
Expected: The call gets ended.
TC8: Pick up the receiver. Insert appropriate one rupee coin; Dial the number after
hearing the ring tone. Assume it got connected and you are getting the ring tone.
Immediately you end up the call.
Expected: The inserted one rupee coin comes out of the exit door.
3). How will you review test cases?
By following a Test Case Review Checklist, as detailed below
(Third party Calendar controls/date pickers will have a text box attached with a
button/icon beside it)
Ans: You can consider the following test cases for a calendar control.
1. Ensure that calendar window is displayed and active, when the calendar is invoked
by pressing the calendar icon. (Once we faced an issue, the calendar window is in
minimized state when we invoked the calendar.)
3. Ensure that when a date is selected in the calendar (double click, or some other
method), the selected date is displayed in the text box.
They may be many other cases, if the text box is editable or not, purpose of
the date field used etc.
8) What can be the possible test cases for the Computer Mouse?
GUI test cases are designed to conduct Usability Testing to verify User
Friendliness of the given application with respect to look & feel, spell mistakes, the
alignment & total objects availability and their access with input devices.
10) What is the difference between positive and negative test cases
Positive Testing = (Not showing error when not supposed to) + (Showing error
when supposed to) So if either of the situations in parentheses happens you have a
positive test in terms of its result - not what the test was hoping to find. The
application did what it was supposed to do. Here user tends to put all positive values
according to requirements.
Negative Testing = (Showing error when not supposed to) + (Not showing error
when supposed to)(Usually these situations crop up during boundary testing or
cause-effect testing.) Here if either of the situations in parentheses happens you
have a negative test in terms of its result - again, not what the test was hoping to
find. The application did what it was not supposed to do. User tends to put negative
values, which may crash the application.
For example in Registration Form, for Name field, user should be allowed to enter
only alphabets. Here for Positive Testing, tester will enter only alphabets and
application should run properly and should accept only alphabets. For Negative
Testing, in the same case user tries to enter numbers, special characters and if the
case is executed successfully, negative testing is successful.
13) Which of the following statements about generating test cases is false?
(a) Test cases may contain multiple valid test conditions
(b) Test cases may contain multiple invalid test conditions
(c) Test cases may contain both valid and invalid test conditions
(d) Test cases may contain more than one step
(e) Test cases should contain expected results
1 Enter User Name and press LOGIN Button. User Name= COES. Should Display
Warning Message Box "Please Enter User name and Password"
2 Enter Password and press LOGIN Button. Password= COES. Should Display
Warning Message Box "Please Enter User name and Password”
3 Enter user Name and Password and press LOGIN Button. "USER = COES AND
Password = XYZ" (Wrong user name & password). Should Display Warning Message
Box "Please Enter User name and Password"
6 Enter user Name and Password and press LOGIN Button. "USER ="" "" AND
Password = "" """(Blank values). Should Display Warning Message Box "Please Enter
User name and Password"
7 Enter User Name and Password and press LOGIN Button. "USER = COES AND
Password = COES" (Correct user name & password). Should navigate to next page.
8 Enter User Name and Password and press LOGIN Button "USER = ADMIN AND
Password = ADMIN" (Correct user name & password). Should navigate to
Maintenance page.
25) For a triangle (sum of two sides is greater than or equal to the third
side), what is the minimal number of test cases required?
The answer is 3
1. Measure all sides of the triangle.
2. Add the minimum and second highest length of the triangle and store the result as
Res.
3. Compare the Res with the largest side of the triangle.