Written by

Siften Halwai

Siften Halwai

Software Testing Types: Black Box, White Box, And Gray Box Testing

/

8 min read

Software Testing Types: Black Box, White Box, And Gray Box Testing
Key Takeaways
  • Equivalence Partitioning: Equivalence Partitioning is also called Equivalence Class Partitioning (ECP). It is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases are derived. Here test cases are designed to cover each partition at once.

  • Boundary Value Analysis: In this type of software testing, extreme boundary values are chosen for testing. The idea is to find an error when feeding minimum, maximum, just inside/just outside boundaries, error values, and typical values to the system.

  • Fuzzing: Fuzzing is testing by feeding random data using malformed/semi-malformed data injection in an automated or semi-automated session. Invalid, unexpected, or random data is provided to the software for analysis. The software is then monitored for crashes, implementation bugs, potential memory leaks, or failed built-in code assertions and security.

  • All Pair Testing: Generally, most common bugs in a program are triggered by an interaction between pairs of parameters. It is a combinatorial method of software testing which tests all possible discrete combinations of each pair of input parameters.

  • Orthogonal Array Testing: It is a statistical software testing technique used when the number of inputs to the application which is to be tested is very small but complex for exhaustive testing. It is used to find faulty logic in computer systems. Orthogonal arrays can be applied for system testing, user interface testing, configuration testing, performance testing, and regression testing.

Types of Software Testing

Black Box Testing

  • Equivalence Partitioning: Equivalence Partitioning is also called Equivalence Class Partitioning (ECP). It is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases are derived. Here test cases are designed to cover each partition at once.

  • Boundary Value Analysis: In this type of software testing, extreme boundary values are chosen for testing. The idea is to find an error when feeding minimum, maximum, just inside/just outside boundaries, error values, and typical values to the system.

  • Fuzzing: Fuzzing is testing by feeding random data using malformed/semi-malformed data injection in an automated or semi-automated session. Invalid, unexpected, or random data is provided to the software for analysis. The software is then monitored for crashes, implementation bugs, potential memory leaks, or failed built-in code assertions and security.

  • All Pair Testing: Generally, most common bugs in a program are triggered by an interaction between pairs of parameters. It is a combinatorial method of software testing which tests all possible discrete combinations of each pair of input parameters.

  • Orthogonal Array Testing: It is a statistical software testing technique used when the number of inputs to the application which is to be tested is very small but complex for exhaustive testing. It is used to find faulty logic in computer systems. Orthogonal arrays can be applied for system testing, user interface testing, configuration testing, performance testing, and regression testing.

  • State Transition Testing:It is a technique in which input conditions are changed or changes are made to the ‘state’ of the system to trigger faulty output. Valid and invalid state transitions are executed via appropriately designed tests.

White Box Testing

  • Control Flow Testing: It is a structural testing strategy that uses the program’s control- flow as a model. Often the designers and developers who develop the software use this technique to test the logic of the code to achieve the required result. In this software testing type, the idea is to select a coverage target on a code path with the help of Control Flow Graph (CFG); input values and test cases are then created, executed and results analyzed.

  • Data Flow Testing: It detects improper use of data values in a program. These data flow anomalies are due to coding errors. Data Flow testing focuses on the points at which variables receive values and at the points at which these values are used or referenced. By tracking data usage dodgy areas of codes can be spotted and then more tests can be conducted there. For data flow testing, a Data Flow Graph is useful. This graph shows the data dependencies between different operations.

  • Branch Coverage Testing: Branch coverage is also known as Decision Coverage. When the application is coded, it cannot be one continuous mode of code. The code branches out to perform a particular functionality. The branch coverage testing validates the branches in the code to ensure there is no abnormality in the behavior of the application.

  • Basis Path Testing: In Basis Path Testing or Structured testing the test case designer derives a logical complexity measure of a procedural design and then this design is used as a guide for determining the number of linearly independent paths. Generally McCabe’s cyclomatic complexity method is used to determine the paths. It was Tom McCabe who proposed the technique. The test cases are then prepared that force execution of each path obtained in the basis set.

  • Loop Testing: This technique focuses exclusively on the validity of loop constructs. There are four classes of loops: Simple loops, Nested loops, Concatenated loops, and Unstructured loops. Testing is done by varying the loop boundary values.

Gray Box Testing

  • Matrix Testing: It tests the status report of the project. A document is prepared that traces and maps user requirements with test case IDs. It is to make sure all the requirements are covered in test cases. It shows the clients that the test coverage is complete. Requirements are mapped with test cases and vice-versa. This test makes it easy to identify if there are any missing functionalities. It is to ensure that the right product is being built.

  • Regression Testing: This software testing technique is utilized to see if the software still works as expected after a change or interface with other software. It ensures that no new bugs have developed after the change. The changes could be -enhancing the software by adding patches to the existing software, changing any configuration, etc. A software change impact analysis can tell which areas could be affected by new changes in the software.

  • Pattern Testing: This type of software testing tests the build, architecture, and design of the software. It ensures that best practices were followed while developing the software.

Software Testing Types: The Wrap-Up

Siften Halwai
Siften Halwai

Siften covers software testing, app performance, and Agile methodology at Openxcell, helping teams build faster and more reliable products.

Siften covers software testing, app performance, and Agile methodology at Openxcell, helping teams build faster and more reliable products.

Need expert help?
Let’s build your AI roadmap
Talk with our team about your product, timeline, and goals.
Contact Us
Share
Share

Have a project in mind?

Tell us what you're building and we'll get back to you with next steps.

Have a project in mind?

Tell us what you're building and we'll get back to you with next steps.

Have a project in mind?

Tell us what you're building and we'll get back to you with next steps.