The purpose of a Black-box test is to verify the unit’s specified behavior without looking at how the unit implements that behavior. Black-box tests focus and rely upon the unit’s input and output.
Black-box Test method focused on the functional requirements of the software / product. In this method, we should not interact with the internal logic of the code. This attempts to find errors in the following categories:
Incorrect or missing functions.
Interface errors.
Errors in database structures / External database access.
Performance errors.
Initialization and termination errors.
Black-box Test is designed to answer the following questions:
How is the functional validity tested?
What classes of input will make you good test cases?
Is the system particularly sensitive to certain input values?
How are the boundaries of a data class isolated?
What data rates and data volume can the system tolerate?
What effect will specific combination's of data have on system operation?
Equivalence Partitioning (EP) – is a black box testing technique that divides the input domain of a program into classes of data from which test cases can be derived. An ideal test case single-handedly uncovers a class of errors there by reducing the total number of test cases that must be developed.
This will reduces the number of tests required. For every operation, you should identify the Equivalence Classes of the arguments and the object states.
An Equivalence Class (EC) represents a set of valid or invalid states for input conditions. An input condition is a specific numeric value (one valid and two invalid EC are defined), a range of values (one valid and two invalid Equivalent Classes (EC) are defined), a set of related values (one valid and one invalid EC are defined) and a Boolean condition (one valid and one invalid EC are defined)
Boundary Value Analysis (BVA) – is a test case design technique that complements EP. Rather than selecting any element of an EC, BVA leads to the selection of test cases at the edges of the class. BVA derives test cases from the output domain.
Advantages and Disadvantages of Black Box Testing:
Advantages:
Black box tests are reproducible.
The environment the program is running is also tested.
The invested effort can be used multiple times.
Disadvantages:
The results are often overestimated.
Not all properties of a software product can be tested.
The reason for a failure is not found.
Use code-coverage tools to identify the code not exercised by your white box testing. Reliability testing should be done simultaneously with your black box testing.
The next two sub sections describe how to identify test cases by selecting the test data for specific arguments.