6.6.1. Writing modules in advance
Prev | 6.6. Approaches to testing | Next

### 6.6.1. Writing modules in advance

If you can identify which reusable modules a test will require in advance, then you can specify them in a general or abstract way, making them easy to adapt and reuse.

These small units are used to construct other modules or building blocks, which are more adapted to the task at hand. Concrete details can be added as needed.

One of the advantages of this approach is that tests are flexible and easy to maintain, since a change made at a central point can update many places where that Test Case has been reused. Tests are also generally more efficient, because time is not wasted specifying what is essentially the same Test Case over and over again.

The difficulty with this approach testing is that it requires a good knowledge of the structure of the test – you have to know which Test Cases are going to be required multiple times, and this is often not easy to recognize at the beginning of testing.