Test suite inheritance
Arranging test suites in a hierarchical order allows inheriting test suite resources along the hierarchy. In this case, the work area will be prepared by copying resources from different level in a parent test suite hierarchy. During this process, lower level resources always overwrite higher level resources.
The advantage using test suite inheritance is, that common resources for several test suites may be defined once on a higher level in the test suite hierarchy. Hierarchical test suites not only allow replacing data, but also test expectations and actions. Thus, default actions defined for the main suite may be overloaded by actions defined in subordinated test suites. Actions provided on lower levels will always overwrite actions with the same name defined on higher levels in the test suite hierarchy.
Test suite inheritance is a feature, which allows reducing test resources extremely by sharing those between several test suites. Thus, the effort for test suite maintenance can be reduced. On the other hand, test suite inheritance includes additional risks, since it is not obvious, which resources are finally used within a test run. In order to be able to review test runs, one may store the test work area before (and/or after) running the test.
The example below shows the work area resulting from test suite hierarchy. In general, the main suite should contain as much resources as possible, but should not contain any resource, which may be omitted in any of the subsequent test runs. Nevertheless, in such cases the preprocessing action may solve the problem by removing unnecessary files.