• No se han encontrado resultados

vii. Estimación de la demanda y proyecciones de crecimiento anual

The test data are the test signals which stimulate the SUT to invoke a given behavioral scenario. In the approach proposed here, a particular set of SigF generators produces selected signals for particular test cases.

The concrete variants of the test signals are provided based on the generation patterns discussed in Section 4.2. The variants generation method can be applied if the signal ranges and partition

points have been defined on all the stimuli signals according to the requirements or engineer’s

experience.

Partitioning the range of inputs into groups of equivalent test data aims at avoiding redundant testing and improving the test efficiency and coverage. The situation is becoming even more complex when hybrid systems are considered since their signals vary continuously in value and time. However, in this work only values are partitioned, they relate to the signal characteristics. It is due to the fact that the SigF generation as such is already implicitly based on the time parti- tioning concept (cf. Figure 4.2). The duration time of a feature is taken as default unless no temporal expressions are included.

Practitioners often define equivalent classes intuitively, relying primarily on case studies. The success of this method depends on the tester’s experience and his subjective judgments.

Another option is to specify the equivalence [Bur03] based on the requirements. This approach

depends on the fact of whether the specification provides sufficient details from which the equivalence classes and boundaries could be derived.

At least three different methods can be used to choose the representatives of the equivalence class, namely random testing, mean value testing, and boundary testing.

Dedicated blocks, called signal range and partition points are provided for every SUT input and output interfaces in order to let the test engineer set the boundaries. Three types of such boundaries are distinguished. These result from the applied data type, the signal range, and

specific partition points.

Data type boundaries are determined by the lower and upper limit of the data type itself (see

Figure 5.20A). They are limited by its physical values. For example, the lower limit of tempera- ture is absolute zero (i.e., 0 K or -273.15˚ C); an unsigned 8-bit value has the range from 0 to 255.

The range of the signal belongs to the data type range and it is specific for the SUT (see Figure

5.20B). For example, if water is the test object, water temperature is the input to the SUT; test data for water may be specified to be between 0˚ C and 100˚ C.

Finally, the partition points (see Figure 5.20C) are of concern since they constitute the specific

data type lower limit

signal(kT)

A) Indication of boundaries for the data type

B) Indication of signal’s range

data type upper limit data type lower limit data type upper limit min value of range max value of range

C) Indication of specific partition points

data type lower limit

data type upper limit min value

of range max value of range specific

point

signal(kT)

signal(kT)

Figure 5.20: Steps of Computing the Representatives.

A number of algorithms are proposed for signal variants generation depending on the SigF type. The analysis of SigF types, equivalence partitioning and boundaries are used in different com- binations to produce the concrete test data variants.

As an example, the feature increase is considered in the following. A number of generation options given in Table 5.2 are possible to produce the signal variants systematically. Here, three possibilities showing two variants for each are considered. For reasons of simplicity the ramp is selected as a shape representative of an increase. In the first option, timing constraint and sig-

nal range are the factors indicating the generation rule. Hence, two different ramps are ob-

tained, both covering the entire range and preserving the proper time constraint (t1 and t2 re-

spectively). In the second option, signal range and the tangent of the angle play a significant

role. Thus, it does not matter how long the signal is generated, the signal variants must hold within the given tan(angle) along the entire value range. Finally, in the third option, timing con- straint and tangent of the angle determine the generation rule. At this point only one default

boundary of the signal range is considered, the tan(angle) is preserved and the predefined t1

Table 5.2: Options for Increase Generation. signal (kT) min max t1 kT min max t2 min max angle min max angle min angle t1 min angle t1 time signal range tangent (angle) Criteria: + + variant 1 variant 2 no. 1 2 3 time signal range tangent (angle) Criteria: + + time signal range tangent (angle) Criteria: + + Options: signal (kT) kT signal (kT) kT signal (kT) kT signal (kT) kT signal (kT) kT

Considering the increase generation in terms of a real-world signal, vehicle velocity is taken as an example. Its value range is between <-10, 70>. Additionally, {0} is taken into account since the car changes its driving direction from backwards to forwards at this point. The third genera- tion option is chosen from Table 5.2. The algorithm computes 10% of the current range around all boundaries and partition points. Thereby, variantn of a signalm belongs to the range calcu- lated according to the formula given in (5.17) for lower or upper limits, respectively, where p is

a partition point or a boundary point.

<pn, pn+10% · (pn+1-pn)> or <pn-10% · (pn-pn-1), pn> (5.17)

Hence, the following increases are obtained as representatives: <-10,-9>, <-1,0>, <0,7> and

<63,70>. The duration of those increases can be either derived from the VFs, or set as default

values, or changed manually. The steps of computing the representatives on the value axis are illustrated in Figure 5.21.

-10 70 velocity(kT) -10 0 70 -10 -9 -1 0 7 63 70 v1 v2 v3 v4 A) B) C) velocity(kT) velocity(kT)

Figure 5.21: Steps of Computing the Representatives for Vehicle Velocity.

Firstly, the boundaries of the range are identified (step A) resulting in a set {-10, 70}. Then, all risk-based partition points are included (step B) resulting in value {0}. They are derived from the specification or the test engineer’s experience. The increase ranges are calculated and the

variants in those ranges are generated (step C) as given below. Finally, durations of the features are added on the time axis.

v1

<-10, -10+10% · (0-(-10))> ≡ <-10, -9>

v2

<0-10% · (0-(-10)),0> ≡ <-1, 0>

v3

<0, 0+10% · (70-0)> ≡ <0, 7>

v4

<70-10% · (70-0),0> ≡ <63, 70>

The example discussed above is an instance of an explicit partition, when a single signal is in-

volved in the partitioning process. Additionally, implicit partitions appear when the SUT input

signals are put in a mathematical relation with each other. In such a case, both sides of the equation (or inequality) are considered. Taking the inequality given below as an example, gen- eration of variants for the relation of two SigFs A and B, on the left, depends on the variants for SigF C, and vice versa.

A – B > C

Hence, firstly the right-hand side partitions for C are produced. Then, the variants for A and B on the left-hand side are generated in such a way that the inequality for the representatives of C is valid. Later on, the procedure is repeated for the left-hand side SigFs, whereat the redundant cases are deleted.

In MiLEST not only SUT input partitioning, but also SUT output partitioning [FDI+04]is ap- plied. This enables (1) to verify the power of the equivalence partitions built for the SUT input signals and (2) to improve the test data generator. The procedure is similar to the input parti- tioning. This time, the ranges of SUT output signals are defined and their partition points are identified. Alternatively, the type of SigFs constraining the output in the assertions may be taken into account. Then, after the test execution, it is checked whether the expected results of the test cases cover all possible equivalence partitions of the SUT output. If this is not the case, additional test stimuli are designed so as to cover the missing values.

Documento similar