Wednesday, November 18, 2015

Equivalence Class Partitioning vs Boundary value analysis

Equivalence Partitioning/Equivalence Class Partitioning
========================================
Test cases for input box accepting numbers between 1 and 1000 using Equivalence Partitioning:
1) One input data class with all valid inputs. Pick a single value from range 1 to 1000 as a valid test case. If you select other values between 1 and 1000 then result is going to be same. So one test case for valid input data should be sufficient....... TC1 : 5

2) Input data class with all values below lower limit. I.e. any value below 1, as a invalid input data test case..... TC2: -5

3) Input data with any value greater than 1000 to represent third invalid input class.  TC3:  1001

Boundary value analysis:
==================
Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000 in our case.

2) Test data with values just beyond the extreme edges of input domains i.e. values 0 and 1001.


Example
========
As an example, consider a printer that has an input option of the number of copies to be made, from 1 to 99. To apply boundary value analysis, we will take the minimum and maximum (boundary) values from the valid partition (1 and 99 in this case) together with the first or last value respectively in each of the invalid partitions adjacent to the valid partition (0 and 100 in this case). In this example we would have three equivalence partitioning tests (one from each of the three partitions) and four boundary value tests. Consider the bank system described in the previous section in equivalence partitioning.



One more Example
=================
Equivalence Partitioning: (EQP)

It is a Black Box Testing Technique that divides the input domain into classes of data from which test cases can be derived.

For example:

If we want to test a field which accepts values from 1 to 9, we will write test cases with the following test data.
1. Test case with test data less than 1
2. Test case with test data greater than 9
3. Test case with test data between 1 and 9

Boundary Value Analysis: (BVA)
This is also a Black Box Testing Technique which concentrates on the Corner cases or the boundaries of the input domain rather than its center

For example If we want to test a field from 1 to 9 boundary values will be 0,1,2,and 8,9,10

The left hand value is called the lower boundary ie 1 here in this example and the Right side value 9 is called the Upper boundary and hence the selection of values is 
a. Upper boundaries +1,-1
b. Lower boundaries +1,-1

No comments:

Post a Comment