Occurs after each of the program tests finished.
Object.OnEndTest()
The OnEndTest event syntax has the following parts:
Name |
Type |
Description |
Object |
AProgram, ADriver, ASystem |
Module object |
The OnEndTest events apply to the Program, System Drivers and System modules. ATEasy will call first the Program OnEndTest, then the System Drivers (if exist in your project) in reverse order, and last the System (if exist in your project). If the event procedure does not contain code then ATEasy will not call the event.
The OnEndTest events are called after each completed test.
The following list shows the order of OnEndTest events combined with default output (see ModuleEvents.prj example for more information). After the last OnEndTest is called, ATEasy will output the application header to the log as shown below (the test result and sometimes the test table). The log output can be override to create custom output using SetLogString function:
* Program.OnInitTask
Task 1 : Untitled Task 1
------------------------------------------
* System.OnInitTest
* Driver1.OnInitTest
* Driver2.OnInitTest
* Program.OnInitTest
* Program.OnEndTest
* Driver2.OnEndTest
* Driver1.OnEndTest
* System.OnEndTest
# Test Name Pin Status
--- ------------------ ------ ------
001 Untitled Test 1 - -
* System.OnInitTest
* Driver1.OnInitTest
* Driver2.OnInitTest
* Program.OnInitTest
* Program.OnEndTest
* Driver2.OnEndTest
* Driver1.OnEndTest
* System.OnEndTest
002 Untitled Test 2 - -
* Program.OnEndTask
Use the OnEndTask events to perform cleanup and to turn off instrument power before the application is existed. You can also redirect ATEasy to ignore and not to continue to the next task or test exit by running another program, task or test using the Run, Task and Test statements. If the event returned normally (not ignored) ATEasy will continue to call all the OnEndTask events for other modules and will continue to the next task or test or exit the program if no more task or test are available.
The following is an example of one way to use the OnEndTest event:
prg1.OnEndTest()
{
! ... program cleanup code ...
print "Program "; Program.Name; " has cleaned up after the end of test "; Test.Id
}