Noeud:Other Uses of a Test Suite, Noeud « Previous »:Maintain the Test Suite, Noeud « Up »:Designing a Test Suite



Other Uses of a Test Suite

In the previous sections, and in particular Look for Realism, we emphasized the fact that a test suite is a user. As a result, a test suite is no less than a set of uses of your package, a corpus linguists would say.

It can then become a good set of samples on which profiling your package (voir Profiling and Optimising Your Code), much more relevant than a few runs by hand.

There exist compilers that optimize a program thanks to profiling information1: they first compile the program making some more or less arbitrary choices, and then the program can be recompiled using logs produced by several runs to make better choices. Again, the test suite, and especially the torture tests, provide a good set of uses for profile guided compilation.


Notes de bas de page

  1. There are several optimization kinds which face the combinatorial explosion: there are many different possibilities amongst which one or several are better than others. Finding an optimum efficiently is then impossible and approximations are used. Sometimes the concept of ``optimum'' is bound to the uses (this choice is better for these uses, that other choice is better for those other uses). In either case, tuning the choice thanks to actual uses improves the average efficiency.