what is unit testing? It comes under white box or Black Box
testing?
Answer Posted / sylesh
I think it depends on how you define the so called 'unit'.
Consider a situation where you wrote an application with
just one functionality, which is implemented in precisely
one function. Assume this function contains 3 logical
blocks of code, say an if..else, a for loop and then
another block of statements.
If we are to say that a white box testing has been done on
that code, we should have tested each of these different
blocks of statements, ensure coverage by carrying out
various and as many tests required by inputting as many
varied parameters to ensure that the execution of code has
been tested through each of the lines / blocks of code.
Same time, the programmer would have tested the function
just by passing the input parameters as specified / assumed
from the functionality of the application and would have
verified whether the output has come right.
So if we consider the unit under consideration to be a
function then I think the so called unit test in that case
should be considered more close to black box where as if
the programmer has catered for complete coverage
considering each and every line of code, it should be
considered white box.
Obviously white box testing is more fail safe but sometimes
programmers end up writing unit test cases just for public
functions in which case I prefer to say it is close to
black box.
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What a team leader will test first when s/he will get new module to test?
How do your characteristics compare to the profile of the ideal manager that you just described?
What is the difference between three tier and two tier application?
What are the different levels of manual testing?
Explain Operational Acceptance Testing with example ?
How can data caching have a negative effect on load testing results?
Can you explain the various elements of function points ftr, ilf, eif, ei, eo, eq, and gsc?
What is boundary value testing? Give an example.
sanity testing is done during regression testing.is it true.if it is true plz explain?
I HAVE AN INTERVIEW IN A SOFTWARE COMPANY FOR THE POST OF FUNCTIONAL TEST ENGINEER. THEY WANT THE PERSON FROM BCOM BACK GROUND( I AM A BCOME GRADUATE 2006) AND THE PERSON SHOULD HAVE GOOD ACCOUNTS KNOWLEDGE. NOW I WANT TO KNOW WHAT KINDS OF QUESTIONS THEY CAN ASK OR CAN GIVE IN WRITTEN TEST. I M NERVOUS COZ ITS BEEN 5 YEARS I HAVE DONE BCOM. SO HOW SHUD I PREPARE FOR INTERVIEW.PLEASE HELP? reply me pls. its urgent. thanks
write 5 critical test cases on product payment form on flipkart.com?
What is defect cascading in software testing?
What is mutation testing & when can it be done?
How to do the performance testing manually? Does you have a test case for that?
What is the difference between baseline and traceability matrix?