The Tolerance Test Type

The tolerance test is an analog test in which a numeric TestResult is compared to a minimum and maximum value that you specify. The tolerance test uses three values:

Test.Value

Test.ValueMinus

Test.ValuePlus

ATEasy determines the minimum value by subtracting Test.ValueMinus from Test.Value. ATEasy determines the maximum value by adding Test.ValuePlus to Test.Value. If TestResult is between the minimum and maximum values, then the value of the internal variable TestStatus is set to Pass.

If the plus value is empty, then any value above the value will be Pass and if the minus value is empty, any value below the value will be Pass.

Defining a Tolerance Test's Properties

To define a tolerance test's properties:

1.      Select the test and click (Properties) on the ATEasy toolbar. The Test Properties dialog appears:

2.      In the Value field, enter the test value.

3.      In the + field, enter the value that when added to the test value equals the maximum value in the test.

4.      In the - field, enter the value that when subtracted from the test value equals the minimum value.

5.      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.

6.      Click the Windows Close button in the upper-right corner of the dialog box to close it.

Tolerance Test Log Output

Here is an example of Tolerance test log output in text format:

Here is an example of the same Tolerance test log output in HTML format:

Here is an example of the Tolerance with an open end (plus value is empty) :

Calculating TestStatus in a Tolerance Test

The following code simulates the way ATEasy calculates TestStatus in a Tolerance test:

if TestStatus=NONE and VarType(TestResult) <> vtEmpty then

Test.Min = Test.Value - Test.ValueMinus

Test.Max = Test.Value + Test.ValuePlus

if TestResult >= Test.Min and Test.Result <= Test.Max

TestStatus=PASS

else

TestStatus=FAIL

endif

endif

! The status now is in TestStatus into which ATEasy

! writes the status value.

See Also

Value Property (ATest), ValueMinus Property (ATest), ValuePlus Property (ATest), TestResult Variable, TestStatus Variable