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:

Tip: 
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
Notes: 

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

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

Tel: +1 (650) 572-1400