The current task ATask object.
ATask Public Const
The Task variable can be used anywhere in the application procedures and tests to obtain the current Task.
By default, the Task variable is initialized to Nothing. ATEasy sets the Task variable to the current task before executing a program task. This is done before ATEasy calls the OnInitTask module event or when calling the task/test statements. After the task is complete and OnEndTask module event is called or the task is exited, ATEasy will set the variable to Nothing.
The Task variable may be used to obtain the values of properties set by the task property pages or to obtain the task tests.
When running multiple UUTs the Task variable holds the current UUT log. Each execution thread have its own Task variable.
The following example prints the current task tests:
Procedure PrintCurrentTaskTests() : Void Public
if Task=Nothing
print "No Task"
else
print "Task Tests/Tasks :";Task.Name;" ("; Task.TestsCount;")"
for i=0 to Task.TestsCount
sTestOrTask="Test"
if Task.Tests(i).IsTask then sTestOrTask="Task"
print sTestOrTask; i+1; "."; Task.Tests(i).Name
next i
endif
AProgram.OnEndTask, AProgram.OnInitTask, ATask, ATest, Program, Task Statement, Test, Test Statement