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 the various elements of function points ftr, ilf, eif, ei, eo, eq, and gsc?
functional testing test cases for transfer funds ?
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 ?.
what is date field test case
how will u create diff types of scenario for any website?
write a testing stratgy \ approach for a product that you are use every day (e.g gmail, out look etc)
Assume a login page, and you have written 10 cases(say for example). How will you justify that these 10 testcase suffient for the login and how do you say this is 100% satisfies the need.
what is a horizontal and vertical matrix explain with examples
What are microsoft 6 rules?
what are the 3 test tool categories and describe what each can do.
How to test whether the application is having memory leakage using task manager and PerfMon. Please tell if any one know. thanku
KINDLY FORWARD ME THE INTERVIEW QUESTIONS & ANSWERS FROM REAL TIME POINT OF VIEW FOR 1.5 YEARS EXPERIENCED CANDIDATE. MY EMAIL ID IS sky_bird433@yahoo.com
what are the Cs in testing
What is mutation testing & when can it be done?
What is your daily process? I have 2+EXP IN MANUAL TESTING.PLEASE SUGGEST ME HOW i ANSWER