GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Testing  >  Testing Basics
Go To First  |  Previous Question  |  Next Question 
 Testing Basics  |  Question 176 of 203    Print  
Difference between equivalence and boundary value analysis?

  
Total Answers and Comments: 5 Last Update: August 11, 2009     Asked by: sakshi_2801 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: d_kanad
 
The main difference between EP and BVA is that EP determines the number of test cases to be generated for a given scenario where as BVA will determine the effectivenss of those generated test cases.

Equivalence partitioning : Equivalence Partitioning determines the number of test cases for a given scenario.
Equivalence partitioning is a black box testing technique with the following goal:
1.To reduce the number of test cases to a necessary minimum.
2.To select the right test cases to cover all possible scenarios.

EP is applied to the inputs of a tested component. The equivalence partitions are usually derived from the specification of the component's behaviour. An input has certain ranges which are valid and other ranges which are invalid. This may be best explained at the following example of a function which has the pass parameter "month" of a date. The valid range for the month is 1 to 12, standing for January to December. This valid range is called a partition. In this example there are two further partitions of invalid ranges. The first invalid partition would be <= 0 and the second invalid partition would be >= 13.

. ... -2 -1 0                  1 .............. 12                                     13 14 15 ..... 
invalid partition 1        valid partition                           invalid partition 2

The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behaviour of the program for the related partition. In other words it is sufficient to select one test case out of each partition to check the behaviour of the program.

To use more or even all test cases of a partition will not find new faults in the program. The values within one partition are considered to be "equivalent". Thus the number of test cases can be reduced considerably.

Equivalence partitioning is no stand alone method to determine test cases. It has to be supplemented by boundary value analysis. Having determined the partitions of possible inputs the method of boundary value analysis has to be applied to select the most effective test cases out of these partitions.
 

Boundary Value Analysis :

Boundary Value Analysis determines the effectiveness of test cases for a given scenario. To set up boundary value analysis test cases the tester first has to determine which boundaries are at the interface of a software component. This has to be done by applying the equivalence partitioning technique.Boundary value analysis and equivalence partitioning are inevitably linked together.

For the example of the month a date would have the following partitions: .
.. -2 -1 0                    1 .............. 12             13 14 15 .....
--invalid partition 1    valid partition              invalid partition 2

By applying boundary value analysis we can select a test case at each side of the boundary between two partitions . In the above example this would be 0 and 1 for the lower boundary as well as 12 and 13 for the upper boundary. Each of these pairs consists of a "clean" and a "dirty" test case. A "clean" test case should give a valid operation result of the program. A "dirty" test case should lead to a correct and specified input error treatment such as the limiting of values, the usage of a substitute value, or in case of a program with a user interface, it has to lead to warning and request to enter correct data.
The boundary value analysis can have 6 test cases: n, n-1, and n+1 for the upper limit; and n, n-1, and n+1 for the lower limit.

Above answer was rated as good by the following members:
suvadra
February 20, 2007 07:58:30   #1  
Subbu        

RE: Difference between equivalence and boundary value ...
Equivalence Partitioning:

The idea behind the technique is to divide or partition a set of test conditions into groups or sets that can be considered the same or equivalent hence ‘equivalence partitioning’. Equivalence partitions are also known as equivalence classes the two terms mean exactly the same thing.

Boundary value analysis:
It is based on testing on and around the boundaries between partitions. If you have done “range checking” you were probably using the boundary value analysis technique even if you weren’t aware of it. Note that we have both valid boundaries (in the valid partitions) and invalid boundaries (in the invalid partitions).


 
Is this answer useful? Yes | No
February 28, 2007 01:21:28   #2  
kalyan M        

RE: Difference between equivalence and boundary value ...
Hi....

We take an example for both.......

both equivalence and boundary value testing are based on how we give inputs for testing an application....

for example we take a month is a input column in a application...

Equivalence Partitioning testing is

.... -2 -1 0 1 .............. 12 13 14 15 .....
--------------|-------------------|---------------------
invalid partition 1 valid partition invalid partition 2

This valid range is called a partition. In this example there are two further partitions of invalid ranges. The first invalid partition would be < 0 and the second invalid partition would be > 13.

In boundary value testing is
if (month > 0 && month < 13)
we check only boundary values...






 
Is this answer useful? Yes | No
January 31, 2008 06:29:26   #3  
melosha Member Since: October 2006   Contribution: 7    

RE: Difference between equivalence and boundary value analysis?
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



 
Is this answer useful? Yes | No
July 07, 2008 08:41:27   #4  
d_kanad Member Since: April 2007   Contribution: 3    

RE: Difference between equivalence and boundary value analysis?
The main difference between EP and BVA is that EP determines the number of test cases to be generated for a given scenario where as BVA will determine the effectivenss of those generated test cases.

Equivalence partitioning : Equivalence Partitioning determines the number of test cases for a given scenario.
Equivalence partitioning is a black box testing technique with the following goal:
1.To reduce the number of test cases to a necessary minimum.
2.To select the right test cases to cover all possible scenarios.

EP is applied to the inputs of a tested component. The equivalence partitions are usually derived from the specification of the component's behaviour. An input has certain ranges which are valid and other ranges which are invalid. This may be best explained at the following example of a function which has the pass parameter "month" of a date. The valid range for the month is 1 to 12 standing for January to December. This valid range is called a partition. In this example there are two further partitions of invalid ranges. The first invalid partition would be < 0 and the second invalid partition would be > 13.

. ... -2 -1 0 1 .............. 12 13 14 15 .....
invalid partition 1 valid partition invalid partition 2

The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behaviour of the program for the related partition. In other words it is sufficient to select one test case out of each partition to check the behaviour of the program.

To use more or even all test cases of a partition will not find new faults in the program. The values within one partition are considered to be "equivalent". Thus the number of test cases can be reduced considerably.

Equivalence partitioning is no stand alone method to determine test cases. It has to be supplemented by boundary value analysis. Having determined the partitions of possible inputs the method of boundary value analysis has to be applied to select the most effective test cases out of these partitions.


Boundary Value Analysis :

Boundary Value Analysis determines the effectiveness of test cases for a given scenario. To set up boundary value analysis test cases the tester first has to determine which boundaries are at the interface of a software component. This has to be done by applying the equivalence partitioning technique.Boundary value analysis and equivalence partitioning are inevitably linked together.

For the example of the month a date would have the following partitions: .
.. -2 -1 0 1 .............. 12 13 14 15 .....
--invalid partition 1 valid partition invalid partition 2

By applying boundary value analysis we can select a test case at each side of the boundary between two partitions . In the above example this would be 0 and 1 for the lower boundary as well as 12 and 13 for the upper boundary. Each of these pairs consists of a "clean" and a "dirty" test case. A "clean" test case should give a valid operation result of the program. A "dirty" test case should lead to a correct and specified input error treatment such as the limiting of values the usage of a substitute value or in case of a program with a user interface it has to lead to warning and request to enter correct data.
The boundary value analysis can have 6 test cases: n n-1 and n+1 for the upper limit; and n n-1 and n+1 for the lower limit.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 11, 2009 03:04:14   #5  
preethi.gollamandala Member Since: September 2008   Contribution: 88    

RE: Difference between equivalence and boundary value analysis?
Eualance class is belongs to the type of the field where as Boundary value belongs to teh size/boundary of field text value
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape