Black Box Testing – Definition
Black box testing might also sometimes be referred to as behavioural testing, specification-based testing or input/output testing.
Simply put, black box testing is a software application testing method where the functionality of the system is tested without any interaction with the internal structure of the application’s code base. This method of testing is a rather dynamic and can be applied to each of the types of software testing.
Black Box Testing – Applications
Black box testing can allow for any type of software system or computer application to be tested. For example:
- A desktop application – Microsoft Word.
- An operating system – Microsoft.
- A database – MySQL.
- A website – TripAdvisor.
- A web application – Google Docs.
- A mobile application – Google Maps.
- All other applications – Games, utilities etc.
Black Box Testing – Approach
Black box testing can be applied in 3 different ways:
- Behavioral Based Testing – This is where a functional element of a system is checked to ensure that it behaves as it should.
- Specification Based Testing – This is where test cases are designed based on the system specifications from the earlier stages of the software development life cycle.
- Input-Output Testing – This is where predetermined inputs are entered into the system to check if the output is as expected.
Black Box Testing – Appropriate Types
Within black box testing, there various types of testing that can be suitably used:
- Functional Testing – This type of black box testing focuses on the practical / functional needs of a system.
- Non-functional Testing – The non-functional type of black box testing does not focus on the functional requirements of system, but rather the non-functional needs of the system such as usability, scalability and performance.
- Regression Testing – Regression testing is a type of testing that is carried out after changes, fixes or upgrades have been made to a system to ensure that the change has not affected the existing functionality of that system.
Black Box Testing – Techniques
There are also 3 core techniques that can be incorporated with black box testing. They are:
- Equivalence Partitioning
- Boundary Value Analysis
- Decision Tables
Black Box Testing – Equivalence Partitioning
Equivalence Partitioning is a black box testing technique typically used with input-output testing. It aims to minimize the number of test cases involved while maintaining adequate test coverage.
With equivalence partitioning, system inputs are grouped together with others that are expected to behave in a similar way. Test cases are designed around any one input selected from a group, and the conditions of that case will stand for all members of the same group.
In other words, if a condition is valid for one input in a group, it will be valid for all others in that group too.
Black Box Testing – Boundary Value Analysis
The boundary value testing technique concentrates on values at boundaries. This approach is useful for deciding if a range of values will be accepted by a system or not.
This technique can help to reduce the number of test cases involved in the testing process.
Black Box Testing – Decision Table
A decision table is a matrix containing causes alongside the effects of those causes. Each column in the matrix is to contain a unique combination of causes and effects.
This testing technique is useful for system functions that have logical relationships between inputs.
Black Box Testing – Advantages
- Black box testing rules out biases as the tester and developers do not usually work together.
- The testers can carry out their work without requiring any knowledge of programming languages.
- Black box testing can quite clearly identify contradictions and problems in the functional specifications of a system.
- With black box testing, the tests are carried out as if a user is using the system, rather than from the perspective of a software developer.
- Test cases for black box testing can be formulated right away after the system specifications have been outlined in the early stages of a project.
Black Box Testing – Disadvantages
- Black box tests cases could have already been carried out by a software developer, thus making them unnecessary.
- Without clear system specifications, it can be difficult to produce proper test cases for black box testing.
- It is not possible to carry out tests for all input possibilities as this would be too time consuming.
- Black box testing cannot be used for testing overly complex sections of systems.