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 is mean by Schedule report who is the responsible for generated that one ?
Difference between adhoc testing and error guessing?
Why Equivalence Partitioning is called equivalence or what is the significance of equivalence term in ECP?
What is data matrix? What is the use of it?
could anyone explain application testing in sequence order i don't have any experience in that
What are the different servers and difference between them?
how to access a build & wat is its configuration
What is middle ware testing?? what are the companies using this tech?
Usually customers won’t give all the requirements. How will you manage & collect all the necessary information?
what is a horizontal and vertical matrix explain with examples
Hi Friends, I have completed 3 rounds of an Interview with HR discussion also and got Offer letter from Cognizant, but after in 30 min they send one more email like Offer is on Hold, and its not valid... Could you please guide me any one , Can i expect Offer again from Cognizant or Can i drop the hopes ?.
Easiest way to write test cases? How i can learn writing the test cases?
Tell some examples of bug severity and bug priority?
Zenq interview questions for manual testing
Anyone attended the manual testing interview with L&T infotech in recent past. please let me know the type of questions they can ask especially in PM round. Thanks