Difference Between White Box, Black Box, and Gray Box Testing

by Nataliia Vasylyna | March 1, 2011 4:00 pm

Note: the article was updated in September 2018.

In this article, we are going to talk about three common approaches to software testing: white-box, black-box, and grey-box testing. We will find out the benefits of each of these approaches and their main specific features.

Black-box testing

Black-box method[1] is a testing approach when QA specialists have no access to the source code or the internal structure of software. The main goal of this testing type is to check whether everything works well from the point of view of an ordinary user.

Black box Approach

Main features:

Focuses on:

Test design techniques based on black-box testing:

Advantages of black-box testing:

Disadvantages of black-box testing:

White-box testing

White-box testing is a testing approach when QA specialists have an access to the source code and internal structure of the software. This testing type implies that a tester knows which code line is called for each functionality. It gives an opportunity not only to better choose an entry data set but also to check errors and exceptions handling.

White box approach

The main features of white-box testing are:

Focuses on:

Test design techniques based on white-box testing:

Advantages of white-box testing:

Disadvantages of black-box testing:

Grey-box testing

Grey-box testing is a testing approach when the testers have only a partial access to the internal structure. Often it includes databases and the information about algorithms used, though it depends on the case.  Still, testing is done from the point of view of an ordinary user like in the case of black-box testing.

Grey box approach

Main features:

Test design techniques based on grey box testing:

The grey box testing incorporates advantages and disadvantages of white-box and black-box techniques and can be a good compromise in the question which of the techniques to choose.

Learn more from QATestLab

Related Posts:

Endnotes:
  1. Black-box method: https://qatestlab.com/resources/knowledge-center/black-box-testing/
  2. decision tables: https://blog.qatestlab.com/2016/02/23/decision-table-testing/
  3. security holes: https://blog.qatestlab.com/2018/04/05/data-breaches-statistics/
  4. What Is The Difference Between White Box, Black Box And Gray Box Testing?: https://blog.qatestlab.com/2011/11/21/what-is-the-difference-between-white-box-black-box-and-gray-box-testing/
  5. Black Box Test Techniques. Random Testing: https://blog.qatestlab.com/2011/09/19/black-box-test-techniques-random-testing/
  6. Software Testing Techniques: https://blog.qatestlab.com/2011/03/01/software-testing-techniques/

Source URL: https://blog.qatestlab.com/2011/03/01/difference-between-white-box-black-box-and-gray-box-testing/