Quality Testing

Quality is delighting customers

High level test case scenarios in calculator for subtraction operation

Hi Team

I had come across a question in an interview recently  the concerned person had asked me to write the high level test case scenarios for  subtraction operation. He said there is a UI with two text boxes for two inputs and a Subtract button. Now i want to derive the high level test scenarios  for that subtraction Operation. Can any body explain this briefly.

Views: 1725

Reply to This

Replies to This Discussion


you have to verify subtraction operation.

there  r two text boxes to take value from user and one button for subtract.But u need another button equal to.Then only complete answer can be evaluated.

In mathematics one policy is there,that the function satisfies the starting and ending value of the range then it can satisfies satisfy for entire range of values from starting to ending.

In above scenario,there will be total 12 buttons.0,1,2,3,4,5,6,7,8,9,subtract and =.

U require at least 4 buttons to press at a time.

0 + 0 =0 


9  - 9=0

u need only two test cases to test the subtraction functionality.

if u finds ok.pls reply.if u have another solution then also u can share to us.

You haven't test anything with that kind of tests. You just know that it can subtract number from itself. And even at the answer the requirement didn't say anything about UI with buttons, just input boxes. So I assume that you can input the texts from keyboard.

But let's go with Prasad's example what kind of situations it doesn't test:

1) Let's name that first number box is X and second one is Y. What if developer is accidentally calculating X-X or Y-Y? Those two test cases do not notice them.

2) What if the result number is unsigned and can't go below 0? So you'd have to add case for that

3) Or what if the result can't go above 0?

4) What if you press buttons in wrong order?

And the original questions: 0 is one magic position, big numbers are also good candidates for different kind of problems, really smalls also. And if you can have decimal numbers, there's also lot of room to play with them. Wrong inputs can be cool to test also. 

Lesson from this post: If you ask something, never expect that you get perfect answer. Always do the thinking yourself also.

thanks teemu.........


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service