When you create a test in ATEasy, you define the test's type and the expected test results as part of the test properties. ATEasy includes a variety of test types, such as MinMax and String (see the table below), and the expected test results are values or ranges of values whose type depends on the test type.
ATEasy also provides two internal variables that are critical to test processing: TestResult and TestStatus. TestResult is the variable where the test result value is stored. It is a variant data type . TestStatus is the variable where the test status value of None, Pass, Fail, or Error is stored. It is an enumerated (enum) integer data type.
At the start of the test, the ATEasy event OnInit initializes TestResult and TestStatus so that TestResult equals 0 and TestStatus equals none. The test runs and outputs a result that is stored in TestResult. ATEasy automatically compares the value of TestResult to the expected test result value(s) that you specified in the test properties. Based on this comparison, ATEasy assigns to TestStatus a value of Pass, Fail, Error, or None. If an error occurs during a test and a measurement can not be taken, TestStatus is set to Error. After assigning a value to TestStatus, ATEasy stores the values of TestStatus and TestResult in the ATest object, where they can be retrieved by the AProgram, ATask, and ATest classes.
At the end of the test, before calling the OnEndTest event, ATEasy checks the value of TestStatus. If TestStatus equals None, then ATEasy calculates TestStatus. ATEasy then prints the value of TestStatus to the Test Log.
The ATEasy test types are described in the following table.
Test Type |
TestResult Type |
Requirements |
Example |
Numeric |
Test.min <= TestResult <= Test.max |
1.5 <= TestResult <= 2.0 if TestResult = 1.7 then if TestResult = 2.1 then TestStatus=FAIL |
|
Not applicable. The Other test type does not use TestResult. |
Use TestStatus as return value |
if a > b and c > 0 then |
|
Numeric (integer recommended) |
Test.mask and TestResult = reference |
Mask=0X4X |
|
Numeric (integer recommended) |
Test.mask and TestResult = reference |
Mask = 0XFF |
|
Numeric |
Test.min <= TestResult <= Test.max |
Value = 3.2 |
|
Numeric (integer recommended) |
TestResult = value |
i = function(x) |
|
String |
TestResult = string |
"ready" |
You can retrieve and set values by calling the following procedures: