Black Box Testing

In black-box testing the structure of the program is not considered. Test cases are decided solely on the basis of the requirements and the internals of the program are not considered for selection of test cases.
In black-box testing, the tester only knows the inputs that can be given to the system and what output the system should give. This form of testing is also called functional or behavioral testing.

Black-box testing method 1: Pair-wise Testing
· There are generally many parameters that determine the behavior of software.
· In pair-wise testing, all pairs of values have to be exercised during testing.
· If there are n parameters, each with m values, then between each two parameter we have m ∗ n pairs.
· The objective of pair-wise testing is to have a set of test cases that cover all the pairs.
· As an example, consider a software product being developed for multiple platforms that
uses the browser as its interface.
· Suppose the software is being designed to work for three different operating systems and three different browsers.
· In addition, as the product is memory intensive there is a desire to test its performance
under different levels of memory.
· So, we have the following three parameters w
Operating System: Windows, Solaris, Linux
Memory Size: 128M, 256M, 512M
Browser: IE, Netscape, Mozilla
· For discussion, we can say that the system has three parameters: A (operating system), B
(memory size), and C (browser).
· Each of them can have three values which we will refer to as a1, a2, a3, b1, b2, b3 and
c1, c2, c3.
· The total number of pairwise combinations is 9 * 3 = 27.
· The number of test cases, however, to cover all the pairs is much less.
· A test case consisting of va
B, B-C, and A-C).
· Hence, in the best case, we can cover all 27 combinations by 27/3=9 test cases

Black-box testing method 3: Boundary Value Analysis
· It has been observed that programs that work correctly for a set of values in an equivalence class fail on some special values. These values often lie on the boundary of the equivalence class.
· Hence, we can say that a boundary value test case is a set of input data that lies on the
boundary of a class of input data or that generates output that lies at the boundary of a class of output data.
· Suppose each input variable has a defined range.
· Then there are six boundary values—the extreme ends of the range, just beyond the ends, and just before the ends. If an integer range is min to max, then the six values are min − 1, min, min + 1, max − 1, max, max + 1.

Black-box testing method 4: State-Based Testing

· There are many systems whose behavior is state-based
· For such systems, an approach for selecting test cases is the state-based testing approach
· The state model shows what state transitions occur and what actions are performed in a
system in response to events.
Given a state model of a system, how should test cases be generated?

Suppose the set of test cases is T. Some of the criteria are:
All transition coverage (AT). T must ensure that every transition in the state graph is
exercised. Hence, during testing all transitions get fired. This will also ensure that all
states are visited. If a state has two incoming transitions t1 and t2, and two outgoing
transitions t3 and t4, then a set of test cases T that executes t1;t3 and t2;t4 will satisfy AT.
All transitions pair coverage (ATP). T must execute all pairs of adjacent transitions.
(An adjacent transition pair comprises two transitions: an incoming transition to a state
and an outgoing transition from that state.) Requires that all combinations of incoming
and outgoing transitions for each state must be exercised by T. If a state has two
incoming transitions t1 and t2, and two outgoing transitions t3 and t4, then a set of test
cases T that executes t1;t3, t2;t4, t1;t4 and t2;t3 will satisfy ATP.
Transition tree coverage (TT). T must execute all simple paths, where a simple path is
one which starts from the start state and reaches a state that it has already visited in this
path or a final state.

Leave a comment