The Action Properties dialog box enables you to define options for the stored action. These settings apply each time the action is called. You can modify an action name, add or modify an action description, and set an action as reusable or non-reusable. For an external action, you can set the Data Table definitions.

The Action Properties dialog box also enables you to define input and output parameters to be used by the action, and specify the object repositories that are associated with the action. For more information, see Associating Object Repositories with Actions.

Note: The following sections describe how to define action properties using the Action Properties dialog box. You can also define actions and action parameters in the Expert View.

You can open the Action Properties dialog box while working with your test by:

  • Right-clicking an action node in the Test Flow pane and selecting Action Properties.
  • Choosing Edit > Action > Action Properties when an action node is highlighted in the Keyword View or displayed in the Expert View.
  • Right-clicking an action node in the Keyword View and selecting Action Properties.

The Action Properties dialog box always contains the General tab, the Parameters tab, the Associated Repositories tab, and the Used By tab:

QTP Action Properties

Note: In addition to the tabs shown above, the Action Properties dialog box for a called external action also contains an External Action tab, and the other tabs are read-only.

Setting General Action Properties

You can use the General tab of the Action Properties dialog box to modify the name of an action, add or edit an action's description, or change the reusability status of the action.

To open the Action Properties dialog box, right-click an action in the Test Flow pane and select Action Properties, or select Edit > Action > Action Properties.

Note: The name of the action and its path are displayed in the tab. If it was defined with a relative path in QTP, then the path is displayed as .\. If the action is a reusable action or an external action, then Reusable action or External Action is displayed next to the action name.

The General tab includes the following options:

Option

Description

Name

The name of the action. By default, the action name is the internal name provided by QTP, such as Action 1. This number is incremented by 1 for each new action that is added to the test.

You can rename the action, as needed. The action name must be unique (within the test), cannot begin or end with a space, cannot exceed 1023 characters, and cannot contain the following characters: \ / : * ? " < > | % ' ! { }

Location

The folder or Quality Center path where the action is stored.

Description

You can insert comments about the action. An action description helps you and other testers know what a specific action does without reviewing all the steps in the action. The description is also displayed in the description area of the Select Action dialog box. This enables you and other testers to determine which action you want to call or copy from another test without having to open it.

Note: You can also add a description when inserting a call to a new action.

Reusable action

Indicates whether the action is a reusable action. By default, this check box is selected. A reusable action can be called multiple times within a test and can be called from other tests. Non-reusable actions can be copied and inserted as independent actions, but cannot be inserted as calls to the original action.

When you change this setting, the action icon changes to a non-reusable action icon or reusable action icon as appropriate. If the steps of the action were expanded, they collapse after changing a non-reusable action to a reusable action. You can view the steps of the reusable action by selecting the action name in the Test Flow pane.

Notes:

  • If the action is called more than once within the test flow or if the action is called by a reusable action, the Reusable action option is read-only. If you want to make the action non-reusable, remove the additional calls to the action from the test.
  • You cannot expand reusable actions from the test flow view. You can view details of a reusable action by double-clicking the action in the Keyword View, or selecting the action from the Action List.
  • Setting Properties for an External Action

    When you insert a call to an external action, you can choose where you want QTP to store the Data Table data. You can specify this in the External Action tab of the Action Properties dialog box.

    To open the Action Properties dialog box, right-click an action in the Test Flow pane and select Action Properties, or select Edit > Action > Action Properties.

    QTP Action Properties2

    The External Action tab includes the following options:

    Option

    Description

    Data Table parameters

    Indicates where to store the action's Data Table data:

    • To use the original action's data, select Use data stored with the original action (read-only). If you select this option, the data is read-only when viewed from the calling test, and all changes to the original action's data sheet apply when the action runs in the calling test.
    • To use an editable copy of the data in the test's Data Table, select Use a local, editable copy. If you select this option, a copy of the called action's data sheet is added to the calling test's Data Table and is independent of the original action.

    Changes to the original action's data sheet do not affect the calling test even if you insert another call to this action after the action's data sheet is modified.

    If the called action has parameterized steps that rely on new information in the original action's data sheet, enter the relevant column names and required data to the action sheet in the calling test manually.

    Note: When you call an external action, the global data sheet columns and data from the called action's test are always imported as a local, editable copy in the calling test's global data sheet.

    Changes to the original action's global data sheet do not affect the calling test even if you insert another call to this action after the called action's global data sheet is modified.

    If the called action has parameterized steps that rely on new information in the global data sheet, enter the relevant column names and required data to the calling test's global data sheet manually.

    Viewing a List of the Tests and Actions Using this Action

    If your tests are stored in Quality Center and are using the resources and dependencies model, the Action Properties dialog box displays the Used By tab. This enables you to view a list of the tests and actions that contain calls to this particular action. This is the same list that is displayed in the Dependencies tab of the Test Plan module in Quality Center.

    To open the Action Properties dialog box, right-click an action in the Test Flow pane and select Action Properties, or select Edit > Action > Action Properties.

    QTP Action Properties3

    The Used By tab includes the following options:

    Option

    Description

    Test

    Indicates the Quality Center path of the test containing a call to this action.

    Action

    Indicates the internal name of the action containing a call to this action. The internal name is the name that QTP applies to an action by default when the action is created, for example, Action 1. The internal name of the action calling this action is displayed even if the calling action was renamed.

    0 comments