Equivalence partitioning (also called Equivalence Class Partitioning or ECP) is a software testing technique that divides the input data of a software unit into partitions of data from which test cases can be derived. In principle, test cases are designed to cover each partition at least once. This technique tries to define test cases that uncover classes of errors, thereby reducing the total number of test cases that must be developed.
In rare cases equivalence partitioning is also applied to outputs of a software component, typically it is applied to the inputs of a tested component. The equivalence partitions are usually derived from the requirements specification for input attributes that influence the processing of the test object. An input has certain ranges which are valid and other ranges which are invalid. Invalid data here does not mean that the data is incorrect, it means that this data lies outside of specific partition. This may be best explained by the example of a function which takes a parameter "month". The valid range for the month is 1 to 12, representing 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.
An additional effect of applying this technique is that you also find the so called "dirty" test cases. An inexperienced tester may be tempted to use as test cases the input data 1 to 12 for the month and forget to select some out of the invalid partitions. This would lead to a huge number of unnecessary test cases on the one hand, and a lack of test cases for the dirty ranges on the other hand.
The tendency is to relate equivalence partitioning to so called black box testing which is strictly checking a software component at its interface, without consideration of internal structures of the software. But having a closer look at the subject there are cases where it applies to grey box testing as well. Imagine an interface to a component which has a valid range between 1 and 12 like the example above. However internally the function may have a differentiation of values between 1 and 6 and the values between 7 and 12. Depending upon the input value the software internally will run through different paths to perform slightly different actions. Regarding the input and output interfaces to the component this difference will not be noticed, however in your grey-box testing you would like to make sure that both paths are examined. To achieve this it is necessary to introduce additional equivalence partitions which would not be needed for black-box testing. For this example this would be:
... -2 -1 0 1 ..... 6 7 ..... 12 13 14 15 .....
invalid partition 1 P1 P2 invalid partition 2
To check for the expected results you would need to evaluate some internal intermediate values rather than the output interface. It is not necessary that we should use multiple values from each partition. In the above scenario we can take -2 from invalid partition 1, 6 from valid partition, and 15 from invalid partition 2.
Equivalence partitioning is not a 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.
Powered by Blogger.
CMM Level 5 companies list List of CMM-5 Certified Software Service Companies in India Listed in no particular order. The purpose of this l...
A formal technical review is a software quality assurance activity performed by software engineers (and others). The objectives of the FT...
The test case design techniques are broadly grouped into two categories: Black box techniques, White box techniques and other techniques tha...
The spiral model, originally proposed by Boehm , is an evolutionary software process model that couples the iterative nature of prototyping ...
The incremental model combines elements of the linear sequential model (applied repetitively) with the iterative philosophy of prototyping. ...
Often, a customer defines a set of general objectives for software but does not identify detailed input, processing, or output requirements...
The spiral model suggests a framework activity that addresses customer communication. The objective of this activity is to elicit pro...
Rapid application development (RAD) is an incremental software development process model that emphasizes an extremely short development cycl...
V-Model: The V-model promotes the idea that the dynamic test stages (on the right hand side of the model) use the documentation identifie...
Severity Value : S1 : Catastrophic Blocking : The use case cannot be completed with any level of workaround. Problem causes data loss, corr...
- A Quick 10-Step Guide (1)
- Black Box Testing (3)
- Bug Life Cycle (2)
- Certifications (3)
- CMM level (2)
- Comparsion (1)
- Configuration Management (3)
- Cookie Testing (1)
- Defect and Failure (1)
- Functional and Non-Functional (1)
- Functional Testing (1)
- Inspection and Walkthrough (1)
- Interview Software Testing (1)
- ISTQB Question Paper Dump (3)
- Load and Stress Testing (1)
- QA and QC (3)
- QA vs QC (1)
- Regression vs Retesting (1)
- RTM (1)
- SDLC (2)
- SDLC Model (5)
- Severity and Priority (1)
- STLC (2)
- Test Cases (4)
- Test Entry and Exit Criteria (1)
- Test Plan (4)
- Types of Testing (2)
- V Model and W Model (1)
- Validation and Verification (2)
- Web Testing (2)
- White Box Testing (1)
- bipin singh
- ▼ 2011 (31)