Skip to content
Related Articles

Related Articles

Difference between Black Box Vs White Vs Grey Box Testing

Improve Article
Save Article
  • Last Updated : 15 Sep, 2022
Improve Article
Save Article

1. Black Box Testing :
Black box testing is a type of software testing in which the functionality of the software is not known. The testing is done without the internal knowledge of the products. It is also called Functional testing. Black-box testing focuses on software’s external attributes and behavior. This type of testing looks at an application’s software expected behavior from the user’s point of view.

2. White Box Testing :
White-box testing or glass-box testing is a software testing technique that tests the software by using the knowledge of internal data structures, physical logic flow, and architecture at the level of source code. This testing works by looking at testing from the developer’s point of view. This testing is also known as glass box testing, clear box testing, structural testing, or non-functional testing. 

3. Gray Box Testing :
Gray Box Testing is a combination of the Black Box Testing technique and the White Box Testing technique in software testing. The gray-box testing involves inputs and outputs of a program for the testing purpose but test design is tested by using the information about the code. Gray-box testing is well suited for web application testing because it factors in a high-level design environment and the inter-operability conditions.

Let’s see the tabular differences between them.

S. No. Black Box Testing Gray Box Testing White Box Testing
1. This testing has Low granularity. This testing has a medium level of granularity. This testing has high-level granularity.
2. It is done by end-users and also done by the tester, developers. It is done by end-users (called user acceptance testing), also done by testers and developers. It is generally done by testers and developers.
3. Here, Internals are not required to be known. Here, Internals relevant to the testing is known. Here, the Internal code of the application and database is known.
4. It is likely to be less exhaustive than the other two. It is kind of in-between. Most exhaustive among all three.
5. It is based on requirements, and test cases on the functional specifications, as the internals are not known. It provides better variety/depth in test cases on account of high-level knowledge of the internals. It has the ability to exercise code with a relevant variety of data.
6. If used algorithm testing, is not suited best for that. If used algorithm testing is also not suited best for that. If used algorithm testing, it is suited best for that.
7. It is suited for functional or business testing. It is suited for functional or business domain testing deeply. It is used for all.
8. This testing involves validating the outputs for given inputs, the application being tested as a black-box technique. Herein, we have a better variety of inputs and the ability to extract test results from the database for comparison with expected results. It involves structural testing and enables logic coverage, decisions, etc. within the code.
9. This is also called Opaque-box testing, Closed-box testing, input-output testing, Data-driven testing, Behavioral, Functional testing This is also called translucent box testing This is also called Glass-box testing, Clear-box testing, Design-based testing, Logic-based testing, Structural testing, Code-based testing.
10.

Black-box test design techniques-

  • Decision table testing
  • All-pairs testing
  • Equivalence partitioning
  • Error guessing

Gray box test design techniques-

  • Matrix testing
  • Regression testing 
  • Pattern testing
  • Orthogonal Array Testing

White-box test design techniques-

  • Control flow testing
  • Data flow testing
  • Branch testing
11. Black Box testing provides resilience and security against viral attacks.  Gray Box testing does not provide resilience and security against viral attacks.  White Box testing does not provide resilience and security against viral attacks. 
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!