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 the difference between static testing and dynamic testing?
need answer interviewer will ask me about all project which i mention in resume or presently i'm working??please reply tomorrow is my interview
Why do you need to parameterize fields in your virtual user script?
what risks do u faced u r projest how do you solve
What are the differences between web applications and client and server applications?
Hi to all, im vaibhav i joined a MNC as a tester and i got a banking (HSBC) project can any one tell me as a fresher what kind of strategy i sholud use to perform better. thanx
how to test a store procedure?
When we are recording in WinRunner and interact with the AUT, what does WinRunner do?
whta is compile module?
What is bucket testing?
How to test the Online Games?? Suggest tricks. I have experience in server-client application testing.
How do your characteristics compare to the profile of the ideal manager that you just described?
write test case for gmail sign up page?
How quickly we need to fix the bug? Or how soon the bug should get fixed?
i looking for the software testing job with the exp of (1.5 yrs ), if anybody knows how to approach the companies ,pls let me know , possible que which will be asked in interview ? pls send me sample resume for testing ....pls do the favour as soon as posible .