What is Black box testing ?
- Black box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings.
- In black-box testing, the tester does not know the internal structure of the module, he tests only for input/output behavior.
- It enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program.
- The selection of test cases is based on the specification of the test object without knowledge of its inner structure.
- It is also very important to design the test cases that demonstrate the behavior of the test object on erroneous input data.
- The black box testing is also known by the name of functional testing, exterior testing, specification testing, data-driven testing, and input/output-driven testing.
Advantages of black-box testing:
The test is unbiased.
From the point of view of the user the test is complete, but not from the point of the designer.
Test cases can be designed as soon as the specification is complete.
Disadvantages of black-box testing:
If the software designer has already run a test case, the test can be redundant.
The test cases are difficult to design.
Different techniques used in black-box testing
Following are the techniques that uses for black-box testing:
A. Equivalence class partitioning:
- The equivalence class partitioning is a method that divides the input data of a software unit into partitions of equivalence classes from which test cases can be derived.
- Equivalence classes are usually formed for input domains and are classified into a valid equivalence class and one or more invalid equivalence classes.
- The idea is to partition the input domain of the system into a finite number of equivalence classes such that each member of the class would behave in a similar fashion.
- The techniques increase the efficiency of software testing as the numbers of input states are drastically reduces.
- This technique involves two steps
i. Identification of equivalence classes.
ii. Generating the test cases.
B. Boundary value analysis:
- Boundary value analysis is a technique in which tests are design to include representatives of boundary values in a range.
- In boundary value analysis, we choose an input for a test case from an equivalence class, such that the input lies at the edge of the equivalence classes.
- Boundary values for each equivalence class, including the equivalence classes of the output, should be covered.
- Boundary value test cases are also says “extreme cases”.
- A boundary value test case is a set of input data that lies on the edge of the boundary of a class of input data or that generates output that lies at the boundary of a class of output data.
- Guidelines for boundary value analysis are:
i. If an input condition specifies a range bounded by values a and b, test cases should be designed with the values a and b and just above and just below a and b.
ii. If an input condition specifies the number of the input value, test cases should be developed that exercise the minimum and maximum number. Values that are just above and just below minimum values and maximum values are also testing.
C. Cause-effect graphing:
- Cause-effect graphing is a technique that aids in selecting combinations of input conditions in a systematic way, such that the number of test cases do not become unmanageably large.
- This technique starts with identifying the causes and effects of the system under testing.
- A cause is a distinct input condition, and an effect is a distinct output condition.
- The conditions that are in the cause-effect graph forms a node.
- The condition should be stated such that they can be set to either true or false.
The steps of cause-effect testing are as follows:
1. For a model, identify input conditions (causes) and actions (effect).
2. Develop a cause-effect graph.
3. The effect-cause graph can be transform into a decision table.
4. Convert decision table rules to test cases. Each column of the decision table are using to represents a test case.
Read more about Software Quality Assurance & its lifecycle