• No results found

This section defines the way our model quantifies the first component of our model, which is the number of defects. Formal equations are proposed on how to calculate the number of estimated defects that would be found by a QA practice p in a single work product w or in a whole phase. The calculation of the estimated number of defects to be found is shown first followed by the calculation of the estimated number of defects to be removed. In a defect detection activity, there are two main variables that are to be considered: 1- the Defect Removal Efficiency (DRE) value of the QA practice used and 2- the defect injection rate of the artifact exposed to the QA activity. The defect injection rate is an experience value which will be retrieved from our repository according to the data analysis and regression process discussed earlier. In our model, each work product of each phase has a specific defect injection rate value retrieved from past projects developed following the same approach. For more details see Section 4.9.3.

• Let Iw be the estimated injection rate of defects per KLOC in w of phaseX.

• Let Nf oundand Nescaped equal the estimated number of defects found and escaped respectively by a QA practice p according to the QA practice’s defect removal effi- ciency value DRE.

Assuming there are evenly distributed defects within a single work product1, the estimated number of defects after applying a QA practice p ∈ P is dependent on the estimated defect removal efficiency of that practice with respect to the category of the work product and the percentage (βp) of the work product that is being inspected using this practice.

1If there is reason to believe this is not the case, the work product should be divided so that this assump-

5.3.1

Number of Defects Found

The first phase, the requirement Phaser, will be taken as an example to show how our model works and how it can be generalised further to include the other phases later as was earlier depicted in the comprehensive model shown in Figure 5.3.

◦ Number of Defects Found by a QA Practice p

The number of defects found or more precisely the number of estimated defects to be found in the work product w, relies entirely on the experience values given by the regression analysis process of previous projects (Section 4.9.2) and the estimated size of the work product currently under test (Section 4.4).

Having determined these values, the estimated number of defects injected into a work product can be calculated by performing the multiplication of the defect in- jection rate value (I) of the work product by the estimated size of the work product esizew as follows:

eDw = Iw ∗ esize(w) (5.1)

The calculation of the mapping function esizew is previously explained in Section 4.4. Based on the eD value taken from Equation 5.1, the number of estimated defects that are going to be removed from the work product w by the QA practice p is as follows:

NF ound= βp∗ eDw∗ DREp (5.2)

As can be seen from Equation 5.2, the estimated number of defects found is reliant on the DRE value of the chosen QA practice and the coverage ratio value (β) of the work product under testing assigned to that QA practice ( Equation 5.2). Note that the choice of the QA practice is modelled using the variable βp.

◦ Number of Defects Found for Work Product w:

Referring back to our work product categorisation scenario discussed in Section 4.5, it was shown that in some cases an individual categorised work product may be assigned more than one single QA practice due to constraints like the short avail- ability of time, the lack of testers who are familiar with such practices, etc. There- fore, in the case of the QA team applying more than one QA practice to a single work product, the estimated number of defects found for the whole work product equals the sum of estimated defects found by all QA practices applied to the work product based on their coverage ratio β. This is expressed in the following equation:

NwF ound=X p∈P

βp∗ eDw∗ DREp (5.3)

Note here that our model assumes that β is non-negative and the sum of the β should equal 1,X

p∈P

are not verified, we assume none ∈ P to be a special QA practice that has a defect removal efficiency of zero (DREnone = 0) for all work products (w ∈ W ). Like- wise, the execution cost and execution time for applying the QA practice none is also equal to zero as there is nothing to be verified.

◦ Total Number of Defects Found in Phasex

For the whole development phase Phase(x), the number of defects found and re- moved can be calculated by extending the previous equations to include every work product as follows: NrF ound= X w∈W X p∈P βp∗ eDw∗ DREp (5.4)

5.3.2

Number of Escaped Defects

From the previous equations for getting the number of found and removed defects by QA practices, it can be clearly noticed that what controls the number of found and escaped defects are the defect removal efficiency (DRE) values for the QA practices chosen. Ac- cordingly, the same concept is followed as in Equations 5.2, 5.3 and 5.4 of estimated defects found and removed but with the substitution of the original variable of DRE with the the new variable (1-DRE). As a result, it will be possible to calculate the estimated number of unfound and removed defects using any QA practice applied as follows:

◦ Number of Escaped Defects From a Single QA Practice:

NEscaped = βp∗ eDw∗ (1 − DREp) (5.5)

◦ Number of Escaped Defects From Work Product w:

NwEscaped =X p∈P

βp∗ eDw∗ (1 − DRE)p (5.6)

◦ Number of Escaped Defects From Phasexis:

NxEscaped = X w∈W

X p∈P

βp∗ eDw∗ (1 − DRE)p (5.7)

Related documents