local variable

Description

Define a local variable and (optionally) assign a value to it, or assign a value to an existing local variable.

Arguments

Valid contexts

This action may be used within the following project items: test modules and user-defined actions.

Notes

Usage

Unlike global variables, a local variable has limited scope, depending on where it is declared:

It should be noted that in all the above cases, a local variable having scope at a given point continues to have scope throughout the call chain of actions originating at that point. That is, for example, if a local variable is declared within a test case, its scope extends to all actions called within the test case, as well as all actions called by them, on down the line.

In the use data set block:

Applicable Built-In Settings

The following settings are applicable to this action: remove double quotes from cells.

Example #1: Demonstrating test case scope

Action Lines

In Example #1:

Example #2: Demonstrating block scope (use data set/repeat for data set)

Action Lines

In Example #2:

Example #3: Demonstrating test module scope

Action Lines

In Example #3:

Example #4: Demonstrating action scope

Action Lines

In Example #4:


Copyright © 2021 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(800) 322-0333