Test and action parameters

Relevant for: GUI tests only

You can parameterize a value in a step using a test or action parameter (both input and output parameters).

Test parameters

Test parameters enable you to share parameter and its value with each action (and subsequently each step in the action) in your test. Once you have created a test parameter, any action parameter can take its value from the test parameter.

Test parameters are created in the Parameters tab of the Properties pane.

Back to top

Action parameters

Action parameters enable you specify parameters that are available for all steps contained in the action.

Action parameters are stored with the action and are maintained to all calls to the action. You can provide the action parameter value from any of the following:

  • A test parameter

  • The parameters of a parent action (if the action is nested)

  • The output of a previous action call (for sibling actions)

You create parameters in the Parameters tab of the Properties pane or the Parameters tab of the Action Properties dialog box. You set the actual value of the action parameter in the Parameter Values tab of the Action Call Properties dialog box.

Input action parameter values can be used only within the steps of the current action. You can use an action input value from another action (or from the test) only if you pass the value from action to action down the test hierarchy to the action in which you want to use it.

When you create test and action parameter values, you can use the parameters and values in numerous places throughout the test. For example, the value of an action parameter can be taken from the test parameter value. Likewise, a test step object value can be taken from an action parameter.

However, there will be times where you want to use the value of a test parameter as the parameter value for a step, or use a parameter of an parent action in a nested (child action). In these cases, you need to pass the parameter from the test to the action, or through the action hierarchy, to enable the step to access the parameter.

Example:  

Suppose that Action3 is a nested action of Action1 (a top-level action), and you want to parameterize a value in Action3 using a value that is passed into your test from the external application that runs (calls) the test.

You can pass the value from the test level to Action1, then to Action3, and then parameterize the required value using this action input parameter value (that was passed through from the external application).

Alternatively, you can pass an output action parameter value from an action step to a later sibling action at the same hierarchical level. For example, suppose that Action2, Action3, and Action4 are sibling actions at the same hierarchical level, and that these are all nested actions of Action1.

You can parameterize a call to Action4 based on an output value retrieved from Action2 or Action3. You can then use these parameters in your action step.

For task details on using test and action parameters, see Use action and test parameters.

Back to top

Add action parameters as steps in the Editor

Instead of selecting input (or output) parameters from the dialog boxes while parameterizing steps or inserting output value steps, you can enter input (or output) parameters as values in the Editor using the Parameter utility object in the following formats:

Parameter("Parameter Name")
Parameter("Action Name", "Parameter Name")

For a specific example, see Parameter in UFT One Object Model Reference for GUI Testing.

Back to top

See also: