Presentation is loading. Please wait.

Presentation is loading. Please wait.

Equivalence partitioning

Similar presentations


Presentation on theme: "Equivalence partitioning"— Presentation transcript:

1 Equivalence partitioning
Darius Liepinaitis IFM-2/2

2 What is Equivalence partitioning?
It is a specification-based or black-box technique, however grey box technique might be applied as well. It is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. Also called Equivalence Class Partitioning.

3 Equivalence partitioning graphically

4 What can be partitioned?
Usually input data is partitioned. In some rare cases output data can partitioned as well. Partition 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. Each partition expected to be treated the same way by the software.

5 Tips for partitioning If an input condition specifies a range, at the minimum one valid and two invalid partitions can be defined. If an input condition requires a specific value, then one valid and one invalid partition can be defined. If an input condition specifies a member of a set, then one valid and one invalid partition can be defined If an input condition is Boolean, then one valid and one invalid partition can be defined.

6 How it works? Take each input's or output's condition that is described in the specification and derive at least 2 classes for it: One class that satisfies the condition – the valid class. Second class that doesn't satisfy the condition – the invalid class. Design test cases based on the equivalence classes.

7 Example A program which accepts an integer in the range 1 to 10.
Three partitions generated: x < 1; 1 ≤ x ≤ 10; x > 10. Test cases (One value from each partition): x = -1; x = 5; x = 12.

8 Boundary value analysis
Equivalence partitioning is supplemented by boundary value analysis. It is a software testing technique in which tests are designed to include representatives of boundary values. It helps to select effective test cases out of partitions.

9 How to identify the values at the boundary?
Identify the boundary both the upper and the lower limit. Identify the values surrounding the boundary.

10 Same example A program which accepts an integer in the range 1 to 10.
Three partitions generated: x < 1; 1 ≤ x ≤ 10; x > 10. Using BVA test cases will be: x = -1, x = 0. x = 1, x = 2, x = 5, x = 9, x = 10. x = 11, x = 12.

11 Summary Pros: Cons: Optimum test case size; Time saving;
Identifies class of error, not just specific invalid data. Cons: Possible mistakes at defining partitions; Not all input are tested.

12 Questions 1/5 Question: Is equivalence partitioning testing is a black-box method?

13 Questions 2/5 Question: What is the minimum number of input partitions?

14 Questions 3/5 Question: What are types of partitions?

15 Questions 4/5 Question: What technique supplements Equivalence partitioning testing?

16 Questions 5/5 Question: How does boundary value analysis supplement equivalence partitioning?

17 Thank you!


Download ppt "Equivalence partitioning"

Similar presentations


Ads by Google