What is Black Box Testing?
The Process of giving the input to the system and checking the output of the system, without knowing about how the system generates the output is called black box testing. It is also called as functional testing or behavior testing. Black box testing does not look inside the program code also known as functional testing
Black box testing resembles how a user would use the application. Hence it is always required to conduct black box testing or functional testing thoroughly.
An example of the black box testing:
Black box tests for Calculator: Provide two number and check if a result of the addition is correct or not without getting into details of how the program is written.
- Entire testing is based only on specifications i.e. what the software is expected to do. Hence, it replicates ‘user’s outlook of application use.
- Tests can be created as soon as the functional specification is baselined.
- Applicable at all levels of testing like unit, integration, system and user acceptance.
- The tester need not have knowledge of development technology.
- Test design expects clear functional specifications to ensure complete testing.
- There is a high probability of reporting tests which are already performed by the developer.
BLACK BOX TESTING TECHNIQUES
Following are some techniques that can be used for designing black box tests.
- Equivalence partitioning:
It is a software test design technique that involves dividing input values into valid and invalid partitions and selecting representative values from each partition as test data.
Advantages of Equivalence Partitioning:
- Equivalence partitioning number of the test cases is reduced
- It eliminates a need of exhaustive testing for entire input domain which is not feasible.
- Equivalence classes or subsets help the tester to focus on a smaller set, which has a higher probability of uncovering defects.
- Allows covering of latest domain of inputs.
2) Boundary Value Analysis:
Boundary value analysis is a test design technique which does a selection of test case that exercises bounding value. Boundary Value Analysis complements an Equivalence class partitioning. It selects test cases at the edges of an equivalence class. The value considered for BVA are a lower boundary, an upper boundary, (upper boundary+1) and (lower boundary -1).
Boundary value analysis cannot b done for a boolean condition.
Why Boundary value analysis:
It is generally observed that systems, software or any other, change the behavior at the boundaries.
Password field accepts minimum 6 characters and maximum 10 characters
Results for values in partitions 0-5, 6-10, 11-14 should be equivalent
1) Test Scenario Description: Enter 0 to 5 characters in password field
Expected Result: System should not accept 6 characters
2)Test Scenario Description: Enter 6 to 10 characters in password field
Expected Result: System should accept.
3)Test Scenario Description: Enter 11 to 14 character in password field
Expected Result: System should not accept 10 characters
3) Cause Effect Graphing:
Cause-effect graphing is a systematic method of generating test cases representing input combination. Here specification must be transformed into a graph which resembles a digital logic circuit.
Advantages cause-Effect Graph:
- Finds out the areas where data is collected for additional study.
- It motivates teams to add and uses the team data of the process.
- Easy to read format to diagram cause-and-effect relationships.
- Point out feasible reasons of difference in a process.
- Everyone to learn more about the factors at work and how they relate.
- Easy to decide the root reasons of a problem or quality using a structured approach