HierarchyThe test descriptions for iValidator have a hierarchical structure. The root is always a single test. A test can be either a unittest or a test suite. A unittest is a reference to a unit. A suite on the other hand contains further tests (unittests and suites in any order) that are grouped into a so-called flow.
In addition to the flow of further tests a suite may also contain setups, checkups and teardowns. These are always units and cannot be nested anymore. The reason for differenciating setups, flow, checkups and teardowns are explained in the section Test Run.
Unittests and suites can be supplied with parameters. Parameters consist of name/value-pairs. Unittests reference their unit by a classname and a methodname. Suites contain a list of setups, a flow, a list of checkups and a list of teardowns. A flow contains a list of tests and a list of controls. A control can be used to state whether the flow is to be executed in sequential or parallel mode. They can also be used to determine what actions to take in the case of errors. Suite Parameter 1 ... Parameter n
Setups Setup 1 Parameter 1 ... Parameter n Classname Methodname ... Setup n
Flow Control 1 ... Control n
Unittest Parameter ... Parameter n Classname Methodname Suite ...
Checkups Checkup 1 Parameter ... Parameter n Classname Methodname ... Checkup n
Teardowns Teardown 1 Parameter ... Parameter n Classname Methodname ... Teardown n Qualified NamesSetups, tests, checkups and teardowns have names. The same names can be used several times. To create a unique name for a test qualified names are used within the framework. The are derived by concatenating all the test names from the root down to the concerned test. For example: topsuite.secondlevelsuite.test denominates the test test in the suite secondlevelsuite to be found in the flow of the suite topsuite. If several tests within a flow have the same name, a $ in combination with a number is postfixed to the name. For example: suite.test$2 denominates the second test with the name of test in the suite suite. For that reason test names in themselves may not contain the symbols '.' and '$'. Parameter InheritanceA suite automatically passes on all its parameters to the underlying setups, checkups, teardowns and the flow. If the flow also contains suites the parameters are passed futher on.
These inherited parameters can be overwritten in the hierarchy. If a parameter is defined for a suite as well as one of its setups, the setups' parameter overwrites the one defined for the suite.
This behaviour may be reversed. It is possible to make a suites' parameters overwrite all those parameters that were defined underneath. Refer to the section Configuration to see how this is done.
|