Return values

Actions can be written to return values to test modules or actions that call them. These may be calculated results, or values retrieved from a system with which the action is interfacing.

User-defined actions can be made to return values to the calling entity (either a test module or another action). From the perspective of the calling entity, the returned values are available in variables placed in argument positions of the calling action line.

Look at the example below:

ヒント: 
double chevrons (>>) in front of q are r have no functional effect. They are just used to imply that the associated arguments will return values.

Line 16 calls the action named division results that perform a division operation. The two values, the operands of a division (numerator and denominator) are passed into division results. The remaining other values - the integral quotient >>q and the remainder (modulus) >>r of the division - are received back from the action.

The definition of division results shows that all four arguments are specified in argument actions similarly, regardless of whether or not they are intended to return values. The action consists of two set variable actions, one of which produces the integer quotient of the division operation, and the other produces the remainder:

Running the test produces the following report for line 19 of test case TC 01:

Let’s examine this example more closely:

                    numerator    denominator    quotient    remainder
division results    13           5              >>q         >>r
注意: 

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGearはLogiGear Corporationの登録商標であり、Action Based TestingおよびTestArchitectはLogiGear Corporationの商標です。ここに記載されているその他の商標は、各所有者の財産です。

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400