write test cases forthe function f=a+b ?

Answer Posted / shailaja

For the addition of two numbers we have to test the
following things...
1)Valid criteria
2)Invalid Criteria
3)Blank
Tc1:Valid data
1)Enter valid data for a &b check f value
Tc2:Blank
1)Enter value for a and keep b as blank and test the
functionality
2)Enter value for b and check the functionality
3)Both are blanks check the functionality


1)a+ve value,B negative value(Vice versa)
2)A some value b is 0(vice versa)
3)Decimal values for both the fields
4)one decimal and one normal digit
5)Check for alphanumeric values
6)Enter space before,middle,end entering the value
andcheck the additon
7)special characters
.so many things are ther to consider the things ...

If anybody asks u to write testcases first ask them to give
clear requirements so that depends upon that we can write
the test cases..
here in this case we dont know the type of variables a&b
if we know the type of variables we can write as per that ..

please let me know that if write anything wrong....

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can any body tell me what is the process of between after getting a documents and testcase writing.

1528


1.How to maintain the Bug status Report? 2.What is project based Company and product based company?

7105


What is smoke testing and what is sanity?

649


What is mean by incident logging system ?

2032


What is software review?

810






what are the testing appraoch that you have tested for Bread toaster

1916


hello there, can anyone tell me what type of question does lg soft company ask in written test especially for a quant part? Thanku

1411


HI. ANYONE HAS ATTENDED INTERVIEW FOR TESTING IN MINDKRAFT GLOBAL. I HAVE WRITTEN TEST FOR SOFTWARE TESTING. CAN ANYONE TELL ME WHAT ALL QUESTIONS CANBE ASKED. PLS REPLY. THANK YOU

2153


1) Difference between "Delete" and "Concatenate" with reference to databases? 2) Difference between SDLC and STLC. 3) Latest versions of the browsers used. 4) What is URL Tampering? 5) Full form of URL. I don't need the answers. These are just for reference.

1973


What is the difference between load testing and performace testing?

694


Hi Friends, This is Chennamsubbaraidu.i Have 2+ Years Realtime Exp in Manual Testing.Am Looking to Shift From My Present Company.Please if u Have Any Openings in Your Company's, Please Let Me Know.Any Location Prefer.Thanks.

1427


hi this is chik here iam showing my current project ERP and am prepair in hr model please tell me details about it and what all function test in hr model and give me some test caserelated to this module.Please tell me am faceing lots of problem in interview am not able to explain in interview please help me out my id is chiku_69@yahoo.in

1533


On login window for username and password auto populated field means what !

1255


What is the difference between system testing and integration testing?

644


user id @ yahoo.com (or) yahoo.co.in (or) gmail.com.... etc

1937