Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the difference between unit, black box & white box testing? Is there any similarity between black box & unit testing?

share|improve this question
Isn't this more on-topic at programmers SE? – Marco Sep 17 '12 at 10:40

2 Answers

up vote 4 down vote accepted
  • A unit test would test an individual part of something larger, in programming this could be a single method in a class used by a program.
  • White box testing is where the tester has knowledge of the system they are testing and uses this to decide what to test. For example, knowing a number is parsed from a textbox the tester might give a value too large for the data they field will be stored as.
  • Black box testing is here the tester doesn't have knowledge of the system, i.e. they see what they are testing as a black box where things go in (inputs/data etc.) and things come out (printouts/information etc.), they don't know how things work inside the box. All the tester cares about is did they get the right output for the input they tested.
share|improve this answer

The term unit test describes the subject of the test, usually a module or another particular unit of code. The terms white box test and black box test describe the knowledge of the tester about the inner workings of the subject.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.