Let's see what it would feel like in our world.

## Software factory

*Welcome to*

**Kode Meister GmbH**We are agile people and use some iterative methodology. Our iterations are a week long. We have 3 developers and 1 tester. The developers finish between 3 and 5 features and solve between 5 and 10 bugs per week. For each feature and bug between 5 and 10 tests are defined. The tester must execute them all before the week ends. Our numbers are:

Average | Value |
---|---|

Feature finished per iteration | 3.6 |

Bugs solved per iteration | 7.4 |

Tests per feature | 6.92 |

Tests per bug | 7.03 |

Tests per iteration | 76.9 |

Minutes to perform a test | 2 |

Our developers constantly break existing features and previously solved bugs so in each iteration we must execute the tests for previous iterations (regression tests). Only 10 weeks after we started, this is what we have:

At this point the tester is overwhelmed by the number of tests. With this progression we will need more testers soon. Do you honestly believe your human testers and developers can keep up with this? You might even solve unemployment issues in Europe.

What's really bad is that it will keep growing and to make it worst, we are not being that rigorous.

You could say:

*that cannot be done, we cannot test this much, we'll just have to be more careful when developing*. Ok, if you believe that: Go ahead to the comments and troll. Nothing from what comes next will be interesting for you. But keep in mind...you won't be making German cars no more.

If you wanna be spared of the mathematics jump to the solution.

## The mathematics behind.

Let ${f}_{\mathrm{i\; j}}$ be the feature $j$ in the iteration $i$, ${F}_{\mathrm{i}}=\left\{{f}_{\mathrm{i\; j}}\right\}$ the set with all features of the iteration $i$, ${b}_{\mathrm{i\; j}}$ the bug $j$ in the iteration $i$, ${B}_{\mathrm{i}}=\left\{{b}_{\mathrm{i\; j}}\right\}$ the set with all the bugs of the iteration $i$, $t\left(x\right)$ the number of test needed for feature or bug $x$. For our first iteration we will have a total of ${s}_{0}$ tests, where:$${s}_{0}=\sum t\left({F}_{0}\right)+\sum t\left({B}_{0}\right)$$ The regression tests for the iteration $i$ will be:

$${r}_{\mathrm{i}}={s}_{\mathrm{i}-1}$$ Generalizing our simple model, the total number of tests:

$${s}_{\mathrm{i}}=\sum t\left({F}_{\mathrm{i}}\right)+\sum t\left({B}_{\mathrm{i}}\right)+{r}_{\mathrm{i}}$$ Using the numbers from

**Kode Meister GmbH**we have:

## To make it worst

If you think you can pay for previous. Perhaps you can afford being more rigorous as well. Before closing a feature or a bug to ensure nothing has been broken the regression tests must be executed. This means $\left|{F}_{\mathrm{i}}\right|$ times more that regression tests should be executed. Same goes for the bugs: $\left|{B}_{\mathrm{i}}\right|$. Finally the testers must run all the tests again, that is one more time. This new formula would be:$${s}_{\mathrm{i}}=\sum t\left({F}_{\mathrm{i}}\right)+\sum t\left({B}_{\mathrm{i}}\right)+\left(\left|{F}_{\mathrm{i}}\right|+\left|{B}_{\mathrm{i}}\right|+1\right){r}_{\mathrm{i}}$$

Using same numbers again we have this values:

## Automize your tests

Testing adds an additional cost to your product, a big one. But if you want quality there is nothing else that would provide as much. I believe that in the long run it even reduces costs. It is not easy, some times you'd have a lot of ideas you won't be able to take out of your head because testing gets in the way. Think of it this way: better testing in the way, than lots of broken features.I plan to dive deeply into testing. It basically goes like this:

## No comments :

## Post a Comment