You are on page 1of 23

Black Box Testing

1. Equivalence Partitioning

2. Boundary Value Analysis

3. Cause Effect Graph


Equivalence Partitioning
 Equivalence partitioning is a technique of software testing comes
under black box.

 Its also called as Equivalence Class Partitioning.

 if we are having 100 number of data means we should create 100


valid test cases for testing the data.

 In this case, if we want to simplifyy the number of test cases


means we should divided the data into some partitions based on
some criteria which is called Equivalence partitioning.
The same range of input data should give the same result
as output.

 Out of the range of input values are invalid data.

 Test cases will be simplified here.

The advantage of this approach is, it helps to reduce the


time of testing due to a smaller number of test cases from
infinite to finite. It is applicable at all levels of the testing
process.
 Ex1: E-commerce(Price categorization)

Discount Invalid 5% 10% 20%(V) 50%(V) Invalid


(Valid) (V)

Total Below 500- 1000 2000- 5000- Above


Purchase 500 1000 - 5000 10000 10000
Amount 2000
Ex 2: Student Mark List

Grade Grade points Marks


O 10 91-100
A+ 9 81-90
A 8 71-80
B+ 7 61-70
B 6 50-60
RA 0 0-49 or <50
Assume that there is a function of a software application that
accepts a particular number of digits, not greater and less than
that particular number.

 For example, an OTP number which contains only six digits,


less or more than six digits will not be accepted, and the
application will redirect the user to the error page.

 EX3:

 1. OTP Number = 6 digits


Advantages

 It is process oriented.

 We can achieve the minimum test coverage.

 It helps to decrease the general test execution time and


also reduce the set of test data.
Boundary Value Analysis

 Boundary Value : An input value or output value is on the edge of


an equivalence partition is called boundary value.

For example the minimum or maximum value of a range.

It is used to developing test cases to test the boundaries which


sepertes the continuous range of input.

Boundary Value Analysis

 It is a technique to refine equivalence partitioning based on testing


at the boundaries between partitions.

 Bva technique used in Ep testing.


Goals

 Find errors associated with the boundary values.

This technique is based on the risks:

 A larger number if plms occur at the boundaries of the input


variables.

 Even if found equivalent class correctly, boundary values may be


incorrectly assigned to another class.

Lower boundary
Upper
On boundary
Test case design by BVA proceeds 3 steps:

 Determine the range of values (Usually it is equivalence


class).

 Determine the boundary values.

Check input variable value at the min, just above min, just
below min, normal, at the max, just belo max, just above max.
Example

Password field can not be shorter than 4 and longer than 28


characters

Equivalence classes Boundary values

0-3 {-1,0,1},{2,3,4}

4-28 {3,4,5},{27,28,29}

28+1
Cause-and –Effect Graphing

 This is a tech that can be used to combine conditions and


derive an effective set of test case that may disclose the
inconsistencies in a specification. Like divide and conquer
method

 All techniques are used to design the test cases.

Steps:

 The tester must decompose the specification of a complex sw


component into lower level units.

 Tester needs to identify causes and their effects.

 Cause – input , Effect - Output


 Puttingtogether a table of causes and effects helps the tester to
record the necessary details.

 The logical relationships between the causes and effects should


be determined. It is useful to express them in the form of set of
rules.
 From the cause and effect formation a boolean cause and effect
graph is created.

 Nodes in the graph are cause and effect.

Causes are placed on left side and effect are placed in right side.

 Logical relationships are expresses using standard logical


operators such as AND, OR, NOT and associated with arcs.

The Graph is then converted into decision table.

 The columns in the decision table are transformed into test cases.

Example

1. Suppose we have to specification for a module that allows a


user to perform a search for a char in an string

2. The specification states that the user must input the length of
the string and the char to search for

3. If the string length is out of range an error message will appear.

4. If the char appears in the string, its position, will be reported.

5. If the char is not in the string the message not found will be
output.
Causes

C1 : Positive int from 1 to 80

C2 : char to search for is in string

Effects:

E1: int out or range

E2: Position of char in string

E3: char not found


The rules of relationships can be described as follows:

 If C1 and C2 then E2

If C1 and not C2 then E3

If not C1 then E1

String : “abcde”

Inputs Length Cahr to search Output


for
T1 5 C 3

T2 5 W Not found

T3 90 Integer not
found
T1 T2 T3
C1 1 1 0
C2 1 0 --

E1 0 0 1
E2 1 0 0
E3 0 1 0

 If C1 and C2 then E2

If C1 and not C2 then E3

If not C1 then E1

String : “abcde”

You might also like