0% found this document useful (0 votes)
262 views18 pages

Equivalence Partitioning

Equivalence partitioning is a software testing technique that divides input and output data into partitions to generate test cases. Test cases are designed to cover each partition at least once to uncover classes of errors rather than individual errors. Boundary value analysis supplements equivalence partitioning by adding test cases that use values at the edges of partitions or just outside the boundaries. Together, equivalence partitioning and boundary value analysis provide an effective and timesaving approach to software testing, though it does not test all possible inputs.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
262 views18 pages

Equivalence Partitioning

Equivalence partitioning is a software testing technique that divides input and output data into partitions to generate test cases. Test cases are designed to cover each partition at least once to uncover classes of errors rather than individual errors. Boundary value analysis supplements equivalence partitioning by adding test cases that use values at the edges of partitions or just outside the boundaries. Together, equivalence partitioning and boundary value analysis provide an effective and timesaving approach to software testing, though it does not test all possible inputs.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Aidas Kasperaviius IFM-0/2

Equivalence partitioning is a software testing technique that divides the input and/or output data of a software unit into partitions of data from which test cases can be derived.
The equivalence partitions are usually derived from the requirements specification for input attributes that influence the processing of the test object. Test cases are designed to cover each partition at least once.

Equivalence partitioning technique uncovers classes of errors. Testing uncovers sets of inputs that causes errors or failures, not just individual inputs.

Usually it is the input data that is partitioned. However, depending on the software unit to be tested, output data can be partitioned as well. Each partition shall contain a set or range of values, chosen such that all the values can reasonably be expected to be treated by the component in the same way (i.e. they may be considered equivalent).

A number of items must be considered:

All valid input data for a given condition are likely to go through the same process.

Invalid data can go through various processes and need to be evaluated more carefully. For example:
a blank entry may be treated differently than an incorrect entry, a value that is less than a range of values may be treated

differently than a value that is greater, if there is more than one error condition within a particular function, one error may override the other, which means the subordinate error does not get tested unless the other value is valid.

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.

x<1

1 x 12

12 < x

Test cases are chosen so that each partition would be tested.

-2 x<1

17 12 < x

1 x 12

The tendency is to relate equivalence partitioning to so called black box testing. However grey box technique might be applied as well.

Depending upon the input the software internally will run through different paths to perform slightly different actions according to the part of the year. Therefore middle partition is divided into two subpartitions.

-2

17

x<1

1 x 6 7 x 12

12 < x

Equivalence partitioning is not a stand alone method to determine test cases. It is usually supplemented by boundary value analysis. Boundary value analysis focuses on values on the edge of an equivalence partition or at the smallest value on either side of an edge.

We use the same example as before. Test cases are supplemented with boundary values.
-2 0

1
2

5 11

12

17 13

x<1

1 x 12

12 < x

Pros: optimum test case size, therefore timesaving; uncovers a class of error, not just an error with specific data input. Cons: possible mistakes when defining partitions; does not test all inputs.

Is equivalence partitioning testing a black-box method?

Equivalence partitioning testing is usually considered as black-box method, however grey-box technique can be applied too.

How does boundary value analysis supplement equivalence partitioning?

Boundary value analysis supplements equivalence partitioning by adding boundary value test cases.

http://en.wikipedia.org/wiki/Equivalence_partitioning http://en.wikipedia.org/wiki/Boundary_value_analysis

http://it.toolbox.com/blogs/enterprise-

solutions/testing-via-equivalence-partitioning-17116 http://www.softwaretestinghelp.com/what-isboundary-value-analysis-and-equivalence-partitioning/ http://www.scribd.com/doc/49845951/6/EquivalencePartitioning

You might also like