Black box testing assesses a system solely from the outside, without the operator or tester knowing what is happening within the system to generate responses to test actions. A black box refers to a system whose behavior has to be observed entirely by inputs and outputs. Even if the internal structure of the application under examination can be understood, the tester chooses to ignore it.
Black box is a software testing style that can apply to different test methodologies.
It compares to white or clear box testing techniques, where the tester considers internal workings of the application code, such as path coverage, branch coverage, memory leaks and exception handling.Content Continues Below
Black box testing techniques and examples
The multitudinous combinations of possible inputs, states and time sequences make complete testing of software programs impossible. The software program variations make it a challenge to choose the most powerful black box tests. Then testers must draw conclusions from that limited subset of tests.
Some black box testing techniques reduce the input space into groups so testers can take a subset of each group to examine:
- Equivalence class partitioning divides software data into equal partitions in order to test each section.
- Boundary value analysis tests for errors within input values that range from one end of a boundary to the other.
- All-pairs testing uses any combination in pairs of data input to check parameters for bugs.
Another approach to black box testing is to plan defined test cases that target a specific feature, or provide regression testing. For example, in his book Black-Box Testing: Techniques for Functional Testing of Software and Systems, Boris Beizer, software engineer and author, creates examples where the entire test plan derives from the application's specification, without looking at how the code operates.
Predefined cases reduce test results variation, which leads to the minefield problem, also known as reduced application test coverage over time. Preplanned tests also prohibit the results from influencing what the tester will do next, commonly referred to as exploratory testing.
Benefits of black box testing
Black box testing separates the tester from the code creator. This software testing technique forces the team to see it from an outsider's view. The black box tester acts from the user's perspective. This creates both social distance and critical distance between software development and test, which makes it more likely that the tester will manipulate the application, referred to as the box, in a manner its creator had not considered.
Clear box testing requires setup and instrumentation, or at least poring over code, while most black box techniques can begin immediately; the operator simply tries to use the software. A system could behave correctly as a black box, but still contain defects in the code itself.
Black boxes outside of software
In telecommunications, a black box is a resistor that connects to a phone line that makes it impossible for the telephone company's equipment to detect when a call has been answered.
In data mining, a black box is an algorithm or a technology that doesn't provide an explanation of how it works.
In film making, a black box is a dedicated hardware device: equipment that is specifically used for a particular function.
In theater and television, a black box is an unfurnished studio.
In the financial world, a black box is a computerized trading system that does not make its rules easily available.