0% found this document useful (0 votes)
65 views5 pages

Black Box Testing

Black-box testing focuses on evaluating the functionality of software without knowledge of its internal workings. It involves selecting inputs to exercise requirements and checking for the expected outputs. Testers derive test cases by modeling objects and relationships in a graph, then partitioning the input domain into equivalence classes and selecting values at boundaries to fully test valid and invalid conditions.

Uploaded by

Karthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views5 pages

Black Box Testing

Black-box testing focuses on evaluating the functionality of software without knowledge of its internal workings. It involves selecting inputs to exercise requirements and checking for the expected outputs. Testers derive test cases by modeling objects and relationships in a graph, then partitioning the input domain into equivalence classes and selecting values at boundaries to fully test valid and invalid conditions.

Uploaded by

Karthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

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.

1. Graph-Based Testing Methods

 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.

Figure 1. Graph notation

 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.

Example 1: Equivalence and Boundary Value


 Let’s consider the behavior of Order Pizza Text Box Below
 Pizza values 1 to 10 is considered valid. A success message is shown.
 While value 11 to 99 are considered invalid for order and an error message will
appear, “Only 10 Pizza can be ordered”

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.

3. Boundary Value Analysis


Boundary value analysis (BVA) has been developed as a testing technique. BVA leads to
the selection of test cases at the “edges” of the class. Rather than focusing on input conditions,
BVA derives test cases from the output domain as well.
Guidelines for BVA are similar in many respects to those provided for equivalence partitioning:
1. If an input condition specifies a range bounded by values a and b, test cases should be
designed with values a and b and just above and just below a and b.
2. If an input condition specifies a number of values, test cases should be developed that
exercise the minimum and maximum numbers. Values just above and below minimum
and maximum are also tested.
.
By applying these guidelines, boundary testing will be more complete, thereby having a
higher likelihood for error detection.

In our earlier equivalence partitioning example, instead of checking one value


for each partition, you will check the values at the partitions like 0, 1, 10, 11
and so on. As you may observe, you test values at both valid and invalid
boundaries. Boundary Value Analysis is also called range checking.

You might also like