We propose a general design-for-testability methodology, starting from simple self-testing of individual classes to pseudo-optimal integration testing, through evaluation of testing efficiency by mutation techniques which ultimately provide an estimation of a component quality.
The integration strategy is based on the decomposition of the test dependency graph. As a result, the components are ordered with respect to the minimization of stubs. The algorithm proceeds by decomposing the graph into its strongly connected components (existing loops are broken). The test dependency graph is a model which represents the different dependencies between components (classes or methods) in an OO system. Vertices of this graph represent the components and oriented edges represent dependencies. The graph algorithm which computes the strategy for integration testing has a complexity quadratic in the size of the model (number of nodes). The algorithm provides a testing order with the purpose of minimizing the number of stubs. Stubs are necessary when a component under test uses a component which is not yet tested. Our algorithm is an adaptation of an algorithm of Bourdoncle which is itself an adaptation of a classical algorithm of Tarjan which computes the strongly connected components of a directed graph.