Test cases and resources contain predefined methods. These methods are called by the test framework during test execution. The contents of these methods, the test logic, is programmed by you as a user. The methods predefined by ETEST do not differ in their behavior from the general methods described in the EcoStruxure Machine Expert Programming Guide.
1 CleanUp: Cleaning after the test case.
2 Execute: Execution of the test case.
3 Finalize
: Cleaning after the test case. (Called once in the cycle in which Execute is terminated.)
4 Prepare: Preparation of the test case.
Test cases contain the methods:
Prepare
Execute
Finalize
CleanUp
Resources contain the methods:
Prepare
CleanUp
These methods must be included in every test object. In addition, test cases and resources may contain any number of other methods.
During the execution of a test case, the methods are called by the ETEST framework in the following sequence, regardless of the order that they appear in the :
Sequence |
Method |
Call type |
Description |
End condition |
---|---|---|---|---|
1 |
Prepare |
Cyclic |
Preparatory measures for the test are executed, for example, initialization of variables or positional control of an axis. |
|
2 |
Execute |
Cyclic |
Contains the test itself. |
|
3 |
Finalize |
Once |
The method is called up if the following conditions apply:
|
Is directly followed by the CleanUp method. |
4 |
CleanUp |
Cyclic |
Resets the test object to the initial state. It can then be reused later. |
|
During the execution of a test case, precisely one method of a test case is called in each cycle. An exception is the method Finalize, which is used in the same cycle as the last call of Execute.
Within the methods of test cases and resources, macros can be used.