Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can you explain the various elements of function points ftr, ilf, eif, ei, eo, eq, and gsc?

1325


functional testing test cases for transfer funds ?

1607


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 ?.

1789


what is date field test case

1928


how will u create diff types of scenario for any website?

2305


write a testing stratgy \ approach for a product that you are use every day (e.g gmail, out look etc)

1875


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.

2205


what is a horizontal and vertical matrix explain with examples

2590


What are microsoft 6 rules?

1178


what are the 3 test tool categories and describe what each can do.

2395


How to test whether the application is having memory leakage using task manager and PerfMon. Please tell if any one know. thanku

1959


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

2730


what are the Cs in testing

2042


What is mutation testing & when can it be done?

1106


What is your daily process? I have 2+EXP IN MANUAL TESTING.PLEASE SUGGEST ME HOW i ANSWER

2221