Black box testing is a testing technique that ignores the internal mechanism of the system and focuses on the output generated against any input and execution of the system. It is also called functional testing.
Black-box testing methods include:
1. Equivalence partitioning
Equivalence partitioning (also called Equivalence Class Partitioning or ECP) is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived.
This method is typically used to reduce the total number of test cases to a finite set of testable test cases, still covering maximum requirements.
E.g.: If you are testing for an input box accepting numbers from 1 to 1000 then there is no use in writing thousand test cases for all 1000 valid input numbers plus other test cases for invalid data.
Using equivalence partitioning method above test cases can be divided into three sets of input data called as classes. Each test case is a representative of respective class.
Valid partition: One input data class with all valid inputs. Pick a single value from range 1 to 1000 as a valid test case. If you select other values between 1 and 1000 then result is going to be same. So one test case for valid input data should be sufficient.
Invalid partition 1: Input data class with all values below lower limit. I.e. any value below 1, as a invalid input data test case.
Invalid partition 2: Input data with any value greater than 1000 to represent third invalid input class.
........-3,-2,-1,0 1,2,3.......999, 1000 1001,1002,.........
-------------------|---------------------|------------------------------
invalid partition 1 valid partition invalid partition 2
2. Boundary value analysis:
Boundary Value Analysis(BVA) is a Software testing technique that is used to verify the conditions at boundaries. In most of applications, the errors are occurred at the boundaries of input values. ‘Boundary value analysis’ testing technique is used to identify errors at boundaries.
Boundary value analysis is mostly used when we checking a range of numbers as inputs.For each range of inputs, there are two boundaries, the lower boundary and the upper boundary, the boundaries are the beginning and end of each valid partition. We should write test cases which can validate the program functionality at the boundaries, and with values just inside and just outside the boundaries.
Consider a Test Scenario, we need to test a input field that will accept the numbers ranges from 1 to 100. Most of the errors may occur at the boundaries of the input values. To test the above test scenario,
Test cases for input box accepting numbers between 1 and 100 using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 100 in our case.
0,1,2..................99,100,101
2) Test data with values just below the extreme edges of input domains i.e. values 0 and 99.
0,1,2..................99,100,101
3) Test data with values just above the extreme edges of input domain i.e. values 2 and 101.
0,1,2..................99,100,101
Boundary value analysis is often called as a part of negative testing.
By checking the above condition we can find-out the hidden errors at the input boundary values.
Consider a Test Scenario, we need to test a input field that will accept the numbers ranges from 1 to 100. Most of the errors may occur at the boundaries of the input values. To test the above test scenario,
Test cases for input box accepting numbers between 1 and 100 using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 100 in our case.
0,1,2..................99,100,101
2) Test data with values just below the extreme edges of input domains i.e. values 0 and 99.
0,1,2..................99,100,101
3) Test data with values just above the extreme edges of input domain i.e. values 2 and 101.
0,1,2..................99,100,101
Boundary value analysis is often called as a part of negative testing.
By checking the above condition we can find-out the hidden errors at the input boundary values.
3. All-pairs testing:
State transition tables
Decision table testing
Use case testing
Exploratory testing and specification-based testing.