Equivalence partitioning

An equivalence class test is used for testing the quality of software.

The aim of the equivalence classes is to form equivalence classes and thus to achieve a high fault detection rate with a minimum number of test cases. The equivalence classes are therefore with respect to input and output data similar classes or objects for which it is expected that they behave the same way. For example. in the program to manage a fleet equivalent classes of vehicles (Ferrari - Ferrari but not BMW - employees). The essence of equivalence classes is to divide the whole input data and output data of a program in groups of equivalence classes, so that one can assume that the same mistake as with any other object of this (equivalence ) class are found with any object of a class (For example, Ferrari ENZO - BMW M3). The formation of test cases to equivalence classes follows this sequence:

  • Analysis and specification of the input data, output data and the conditions according to the specifications
  • Forming the equivalence classes by classifying the range of values ​​for the input and output data
  • Determination of test cases by choosing values ​​for each equivalence class

The test cases created thus apply to all objects in the equivalence class started, so not a separate test case must be created for each instance.

There are two different types of equivalence classes:

  • Valid equivalence classes
  • Invalid equivalence classes

For valid equivalence classes are valid input data used for invalid equivalence classes invalid input data.

Equivalence classes are generally created from a logical point by particular attention to the similarity of the class or object properties and their determination. Candidates for the formation of equivalence classes are in the world of object-oriented programming in particular child and superclasses. With abstract classes, make input and output parameters, in particular with regard to the different Ausimplementierung the inherited methods / procedures. Significantly different implementations in child classes of an abstract class, vehicle ( eg truck, car ) may not be suitable for the formation of equivalence classes be (eg Method: ermittleGueltigeAnzahlAchsen () → Cars 2; Truck: 3 ( tractor only ) ).

An example of a threshold analysis for valid and invalid equivalence classes:

The valid values ​​of an input / output equivalence classes are formed at between 100 and 1000 A test case is now defined, which verifies that. :

  • The input / output is minus infinity to 99 rejected as invalid (invalid equivalence classes: - infinity to 99 inclusive )
  • The input / output of 100 to 1000 accepts as valid ( valid equivalence classes 100, including up to 1000), and
  • The input / output of 1001 to infinity will be rejected as invalid (invalid equivalence classes 1001 to including infinity)
73558
de