views:

100

answers:

3

I'm trying to understand one in terms of how it compares to the other.

Is white box testing where you can see the code and black box testing where you don't look at the code?

+1  A: 

basicaly yes.

in black box testing you test if the expected input to your object produces expected output without the ability to change the underlying code.

in white box testing you can see the code and you test all possible paths through it.

Mladen Prajdic
They should call it clear box testing instead of white box testing.
Phenom
+1  A: 

Yeah, you pretty much have it. Black box is testing the externals without knowledge (or access) of/to anything internal. White box testing is being able to look at (and perhaps modify) the internal state of what you are testing. They both have different uses. Unit tests are most often (but not always) white box tests.

Francis Upton
What are unit tests?
Phenom
Unit tests test particular functions typically at a very granular level. They are the lowest level tests and they are typically created by the developers of the application and formed in to a regression test suite comprised of hundreds or thousands of them which can be run anytime things change to detect a regression.
Francis Upton
+4  A: 

Wikipedia:

White box testing uses an internal perspective of the system to design test cases based on internal structure. It requires programming skills to identify all paths through the software.

versus

Black box testing takes an external perspective of the test object to derive test cases.

unwind