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 any one give a summary of testing a territory management system? what would be the test scenarios, few test cases. how it works.
Give me sample test cases for smoke testing
1...DIFF BETWEEN QTP AND WIN RUNNER? 2... CHECKPOINTS AND EXPLAIN EACH OF THEM? 3...WHY IS STEP GENERATOR? 4... WHAT IS THE DIFF BETWEEN FUNCTIONS AND SUB ROUTINE?
ive been looking for a junior tester job for quite some time now, but most company keep requisting for experienced staffs, but if i dont start from somewhere how do i get the experience
Hi, i am looking job in perfomance testing using Loadrunner can any body help me a project in any domine plz(Usah) chs_29@rediffmail.com
What are the different strategies for rollout to end users?
How to test a Falsh player scrollings?
can u merge 10GUI map files into a single GUI map file in winrunner?
What is a test server?
hi sir, i completed my GNIIT from NIIT. i recently joined in IT company for Testing(manual) on JD EDWARDS.So,i wanna to ask that after taking 1yr experience can i able to do Testing .NET in another company.Pl i am confused pl send yours suggestion throw my email(paresh_shindeal@yahoo.com)
When we are recording in WinRunner and interact with the AUT, what does WinRunner do?
What is change request, how you use it?
Password is having 6 digit alphanumeric then what are the possible input conditions?
what technical problem u face in your module please tell what is it mean its any bug or anything else i want ans give any example which ever modul u r working for u can give me any example
hai friends i did my bcom (distance with out inter)and iam pursuing mca(distance alagappa university)iam learning testing cource in ameerpet can i elgibel for testing jobs pls guide me … …and send details to rangavijetha@gmail.com..thanks