In a String test, the value of the TestResult variable is compared to a string. This type of test is usually used for communication testing, in which the data received and stored in the TestResult internal variable must be equal to the string specified in the test. If TestResult is equal to the string's value, then TestStatus is Pass.
To define a String test's properties:
1. Select
the test and click
(Properties) on the ATEasy
toolbar. The Test Properties dialog
appears:
2. In the String field, enter the string to which TestResult is to be compared.
3. Make other selections and entries as needed in the dialog box. For descriptions of the common test properties (name, ID, etc.), see Test Properties Window.
4. Click the Windows Close button in the upper-right corner of the dialog box to close it.
Here is an example of String test log output in text format:
Here is an example of the same String test log output in HTML format:
The following code simulates the way ATEasy calculates TestStatus in a String test:
if TestStatus=NONE and VarType(TestResult) <> vtEmpty then
if TestResult = Test.String
TestStatus=PASS
else
TestStatus=FAIL
endif
endif
! The status now is in TestStatus into which ATEasy
! writes the status value.
String Property (ATest), TestResult Variable, TestStatus Variable