White-box testing is a type of testing in which the tester has knowledge of code and design of an application and uses the same to test the individual methods of the application.
Whereas, in black-box testing, the tester has no knowledge of application code and access the application just like an end user.
Let's now see the difference between the two -
|#||White-box Testing||Black-box Testing|
|1.||In white-box testing, knowledge of application code and architecture is required.||In black-box testing, knowledge of internal functioning of the application is not required.|
|2.||Using white-box testing, we can test much granular aspects of the application.||Using black-box testing, we test the end to end functionality of the application.|
|3.||It is generally performed by developers or QA with sound knowledge of programming and application's architecture.||It is generally performed by independent QA team.|
|4.||It is applicable for lower levels of testing - unit testing and integration testing where we have to deal with modules and their interfacing.||It is applicable for higher levels of testing - system testing and acceptance testing where we are required to test the application as a whole.|
|5.||The different type of white-box testing techniques are - Branch testing, Statement coverage, Decision coverage, Path testing, Data flow testing etc.||The different type of white-box testing techniques are - Decision table testing, Equivalence partitioning, Boundary value analysis, Use case testing etc.|