Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Software Testing

Presented by,
Bheema Shireesha
Assistant
Professor,
IIIT Ongole,
RGUKT-AP
Unit -III

Black Box Testing


Black Box Testing

Black box testing involves testing a system with no prior


knowledge of its internal workings. A tester provides an
input, and observes the output generated by the system under
test.
Contents
Using Black Box Approach to Design Test Case

– Random Testing
– Requirements based testing
– Boundary Value Analysis
– Equivalence Class Partitioning
– State-based testing
– Cause-effect graphing
– Compatibility testing
– User documentation testing
– Domain testing
BVA or Boundary Value Analysis

Boundary value analysis is another black box test design techniques and it
is used to find the errors at boundaries of input domain rather than finding
those errors in the center of input.
These are widely used to pick the test cases in a systematic
manner.
By using these techniques we could save lots of testing time and
get the good test coverage.
Boundary value analysis (BVA) is based on testing the boundary
values of valid and invalid partitions.
The Behavior at the edge of each equivalence partition is more
likely to be incorrect than the behavior within the partition, so boundaries
are an area where testing is likely to yield defects.
• Every partition has its maximum and minimum values and these

maximum and minimum values are the boundary values of a partition.

• A boundary value for a valid partition is a valid boundary value.

Similarly a boundary value for an invalid partition is an invalid

boundary value.

• Tests can be designed to cover both valid and invalid boundary values.

When designing test cases, a test for each boundary value is chosen.

For each boundary, we test +/-1 in the least significant digit of either side

of the boundary.

Boundary value analysis can be applied at all test levels.


Example 1:

Minimum boundary value is 18


Maximum boundary value is 56
Valid Inputs: 18,19,55,56
Invalid Inputs: 17 and 57
Test case 1: Enter the value 17 (18-1) = Invalid
Test case 2: Enter the value 18 = Valid
Test case 3: Enter the value 19 (18+1) = Valid
Test case 4: Enter the value 55 (56-1) = Valid
Test case 5: Enter the value 56 = Valid
Test case 6: Enter the value 57 (56+1) =Invalid
Equivalence Partitioning (EP)

In Equivalence Partitioning, the test input data is partitioned into a


number of classes having an equivalent number of data.

The test cases are then designed for each class or partition. This helps to

reduce the number of test cases.

Dividing the test input data into a range of values and selecting one input

value from each range is called Equivalence Partitioning. This is a

black box test design technique used to calculate the effectiveness of test

cases and which can be applied to all levels of testing from unit,

integration, system testing and so forth.


• We cannot test all the possible input domain values, because if we

attempted this, the number of test cases would be too large. In this

method, input data is divided into different classes, each class

representing the input criteria from the equivalence class.


• We then select one input from each class.

• This technique is used to reduce an infinite number of test cases to a

finite number, while ensuring that the selected test cases are still

effective test cases which will cover all possible scenarios.


Let’s take a very basic and simple example to understand the Equivalence

Partitioning concept:

If one application is accepting input range from 1 to 100, using equivalence

class we can divide inputs into the classes, for example, one for valid input

and another for invalid input and design one test case from each class.
Example:

In this example test cases are chosen as below:

One is for valid input class i.e. selects any value from input between

ranges 1 to 100. So here we are not writing hundreds of test cases for

each value. Any one value from this equivalence class should give you

the same result.

One is for invalid data below lower limit i.e. any one value below 1.

One is for invalid data above upper limit i.e. any value above 100.
Equivalence Partitioning is also known as Equivalence Class

Partitioning.

In equivalence partitioning, inputs to the software or system are

divided into groups that are expected to exhibit similar behavior, so

they are likely to be proposed in the same way.

Hence selecting one input from each group to design the test cases.

Each and every condition of particular partition (group) works as same

as other.

If a condition in a partition is valid, other conditions are valid too.

If a condition in a partition is invalid, other conditions are invalid too.


It helps to reduce the total number of test cases from infinite to finite.
The selected test cases from these groups ensure coverage of all possible
scenarios.
Equivalence partitioning is applicable at all levels of testing.
Example on Equivalence Partitioning Test Case Design Technique:
Example 1:
Assume, we have to test a filed which accepts a Mobile Number of ten
digits.
1.Valid input: 10 digits
2.Invalid Input: 9 digits, 11 digits
3.Valid Class: Enter 10 digit mobile number = 9876543210
4.Invalid Class Enter mobile number which has less than 10 digits = 987654321
5.Invalid Class Enter mobile number which has more than 11 digits
= 98765432109
Thank You

You might also like