Black Box Testing
Black Box Testing
Black-box testing, also called behavioral testing, focuses on the functional requirements of
the software. Black-box testing techniques enable you to derive sets of input conditions that will
fully exercise all functional requirements for a program.
In this method, tester selects a function and gives input value to examine its functionality, and
checks whether the function is giving expected output or not. If the function produces correct
output, then it is passed in testing, otherwise failed. The test team reports the result to the
development team and then tests the next function. After completing testing of all functions if
there are severe problems, then it is given back to the development team for correction.
The first step in black-box testing is to understand the objects that are modeled in software
and the relationships that connect these objects.
Once this has been accomplished, the next step is to define a series of tests that verify “all
objects have the expected relationship to one another”.
Software testing begins by creating a graph of important objects and their relationships and
then devising a series of tests that will cover the graph so that each object and relationship is
exercised and errors are uncovered.
To accomplish these steps, begin creating a graph—
a collection of nodes that represent objects,
links that represent the relationships between objects,
node weights that describe the properties of a node and
link weights that describe some characteristic of a link.
The symbolic representation of a graph is shown in Figure 1.
Nodes are represented as circles connected by links that take a number of different forms.
A directed link (represented by an arrow) indicates that a relationship moves in only one
direction.
A bidirectional link, also called a symmetric link, implies that the relationship applies in
both directions.
Parallel links are used when a number of different relationships are established between
graph nodes.
2. Equivalence Partitioning
Equivalence partitioning is a black-box testing method that divides the input domain of a
program into classes of data from which test cases can be derived.
Test-case design for equivalence partitioning is based on an evaluation of equivalence
classes for an input condition.
Equivalence classes may be defined according to the following guidelines:
1. If an input condition specifies a range, one valid and two invalid equivalence classes are
defined.
2. If an input condition requires a specific value, one valid and two invalid equivalence
classes are defined.
3. If an input condition specifies a member of a set, one valid and one invalid equivalence
class are defined.
4. If an input condition is Boolean, one valid and one invalid class are defined.
Submit
Order Pizza:
Here is the test condition
1. Any Number greater than 10 entered in the Order Pizza field(let say 11) is considered
invalid.
2. Any Number less than 1 that is 0 or below, then it is considered invalid.
3. Numbers 1 to 10 are considered valid
4. Any 3 Digit Number say -100 is invalid.
The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick only
one value from each partition for testing. The hypothesis behind this technique is that if one
condition/value in a partition passes all others will also pass. Likewise, if one condition in a
partition fails, all other conditions in that partition will fail.