language-icon Old Web
English
Sign In

Boundary-value analysis

Boundary value analysis is a software testing technique in which tests are designed to include representatives of boundary values in a range. The idea comes from the boundary. Given that we have a set of test vectors to test the system, a topology can be defined on that set. Those inputs which belong to the same equivalence class as defined by the equivalence partitioning theory would constitute the basis. Given that the basis sets are neighbors, there would exist a boundary between them. The test vectors on either side of the boundary are called boundary values. In practice this would require that the test vectors can be ordered, and that the individual parameters follows some kind of order (either partial order or total order). Boundary value analysis is a software testing technique in which tests are designed to include representatives of boundary values in a range. The idea comes from the boundary. Given that we have a set of test vectors to test the system, a topology can be defined on that set. Those inputs which belong to the same equivalence class as defined by the equivalence partitioning theory would constitute the basis. Given that the basis sets are neighbors, there would exist a boundary between them. The test vectors on either side of the boundary are called boundary values. In practice this would require that the test vectors can be ordered, and that the individual parameters follows some kind of order (either partial order or total order). Formally the boundary values can be defined as below:-Let the set of the test vectors be X 1 , … , X n {displaystyle X_{1},dots ,X_{n}} .Let's assume that there is an ordering relation defined over them, as ≤ {displaystyle leq } .Let C 1 , C 2 {displaystyle C_{1},C_{2}} be two equivalent classes.Assume that test vector X 1 ∈ C 1 {displaystyle X_{1}in C_{1}} and X 2 ∈ C 2 {displaystyle X_{2}in C_{2}} .If X 1 ≤ X 2 {displaystyle X_{1}leq X_{2}} or X 2 ≤ X 1 {displaystyle X_{2}leq X_{1}} then the classes C 1 , C 2 {displaystyle C_{1},C_{2}} are in the same neighborhood and the values X 1 , X 2 {displaystyle X_{1},X_{2}} are boundary values. In plainer English, values on the minimum and maximum edges of an equivalence partition are tested. The values could be input or output ranges of a software component, can also be the internal implementation. Since these boundaries are common locations for errors that result in software faults they are frequently exercised in test cases. The expected input and output values to the software component should be extracted from the component specification. The values are then grouped into sets with identifiable boundaries. Each set, or partition, contains values that are expected to be processed by the component in the same way. Partitioning of test data ranges is explained in the equivalence partitioning test case design technique. It is important to consider both valid and invalid partitions when designing test cases. The demonstration can be done using a function written in C. On the basis of the code, the input vectors of are partitioned. The blocks we need to cover are the overflow statement and the underflow statement and neither of these 2. That gives rise to 3 equivalent classes, from the code review itself. we note that there is a fixed size of integer hence:- We note that the input parameter a and b both are integers, hence total order exists on them.When we compute the equalities:- we get back the values which are on the boundary, inclusive, that is these pairs of (a,b) are valid combinations,and no underflow or overflow would happen for them.

[ "Equivalence partitioning" ]
Parent Topic
Child Topic
    No Parent Topic