Status Property ( AProgram)

Returns or sets the status of the program tests.

Syntax

 [ enStatus = ] Object.Status

The Status property syntax has the following parts:

 

Name

Type

Description

Object

AProgram

AProgram object

enStatus

enumATestStatus

An integer specifying the status of this program tests.

Where

enumATestStatus can be one of the following:

 

Name

Value

Description

NONE

0

None

PASS

1

Pass

FAIL

2

Fail

ERR

3

Error

Comments

ATEasy initializes the program status to None in the beginning of this program run before calling the program's OnInit event. At the end of the program and before the program's OnEnd event is called, ATEasy calculates the program status, by looping through all tasks and tests of this program: if any of their test status fails without any error, it is set to Fail, if any of status is error, then it is set to Err. If during the program run, the program (or task/test) status is set by the application (user) to a value different than None, ATEasy does not calculate the status at the end of the program and the status is left as is.

The program status is also used by ATEasy when printing the log output to the test log (as UUT Status:) at the end of the program.

When repeating a task or a test, only the last iteration is considered as the task/test status. If the you need an accumulative status, the following example (second example) shows how to find such status.

Example

The following code in the program's OnEnd event would abort the entire application if the program ended with a status of Fail or Err:

if Program.Status >= Fail then Abort

The following code in the program's OnEndTest event would record the accumulative program status:
 

if Test.Status > Program.Status then Program.Status = Test.Status

Applies to

AProgram

See Also

Status Property (ATask), Status Property (ATest), TestStatus Variable