Article
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    APIs
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> Testing >> Equivalence Partitioning
Equivalence Partitioning
Equivalence Partitioning


by Abhishek Singh on 7/29/2010 2:18:23 PM

Views: 2140       Comments: 1

Equivalence Partitioning

To actually start off the testing, it is good to have optimum test cases in place which not only cover all the desired features but also are sufficient to detect good quality bugs. There are many design techniques for writing test case. One of the most popular among them is Equivalence Partitioning. It is a Black-box (Specification Based) Test Case Design Technique with two primary goals

·        To minimize the number of test cases to necessary minimum.

·        To select the right test cases to cover all possible scenarios.  

This method divides the input domain of a program into classes of data from which test cases can be derived. It is based on an evaluation of equivalence classes for an input condition. An equivalence class represents a set of valid or invalid states for input conditions. An input has certain ranges which are valid and other ranges which are invalid.   Supplemented by BVA( 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

This can be explained by the following example of a function which accept input parameter "month" of a date. The valid range for the month is 1 (January ) to 12 ( 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 = 13. You can also have invalid partition for non-digit input as well.

        .... -2 -1 0 1.............. 12 13 14 15.....

      --------------|-------------------|---------------------

 Invalid partition 1     valid partition    invalid partition 2

 

Why Equivalence Partitioning

The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behavior 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 behavior 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.

An additional effect by applying this technique is that you also find the so called "dirty" test cases. An inexperienced tester may be tempted to use input as 1 to 12 and forget to select some invalid partitions all together. This would lead to a huge number of unnecessary test cases on the one hand, and lack of test cases on the other hand.

 

Types of Equivalence Classes

·        Continuous classes run from one point to another, with no clear separations of values. An example is a temperature range.

·        Discrete classes have clear separation of values. Discrete classes are sets, or enumerations.

·        Boolean classes are either true or false. Boolean classes only have two values, either true or false, on or off, yes or no. An example is whether a checkbox is checked or unchecked.

Thus, Equivalence classes may be defined according to the following guidelines:

·        If an input condition specifies a range, at the minimum one valid and two invalid equivalence classes can be defined.

·        If an input condition requires a specific value, then one valid and one invalid equivalence class can be defined.

·        If an input condition specifies a member of a set, then one valid and one invalid equivalence class can be defined

If an input condition is Boolean, then one valid and one invalid equivalence class can be defined.

 

 

Report Abuse Form
Reason:    
 


Equivalence Partitioning
by Sanjay Sharma 11/21/2011 5:11:27 AM
nice article abhishek...can you provide more useful articles?
Report Abuse
Title :
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
     
 
Latest Article by Abhishek SinghRSS Feed
    
    
    
    
    
    
    
    
    
More...
Latest BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 6678
Advertisement
MindStick DataConver
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.