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
Can you explain decision tables?
What are the main key components in web applications and client and server applications? And explain the differences between them?
Write the function test case to add a customer to database.
Have you ever completely tested any part of a product? How?
I have an Interview about Guidewire claimcenter,so could you provide any info regd it?.I would really appreciate any kind of help- email at hvshah2001@gmail.com
Do you know anything about Set Top Boxes?
1. what exactly is heuristic checklist approach for unit testing ?
What is meant my Firewall testing? how the testing is performed on it?
how to connect oracle with test director? in testdirector we will be getting only reports? pls answer Thanks in Advance
What is early testing?
What is bucket testing?
What is back to back testing?
You may be overqualified for this position we have to offer
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.
What is Batch testing? Facets Benefit Configuration