You can insert a call to a reusable action that is stored in your current test (local action), or in any other test (external action). Inserting a call to an existing action is similar to linking to it. You can view the steps of the action in the action view, but you cannot modify them. The called action's local object repository (if it has one) is also read-only.

If the called external action has data in the Data Table, however, you can choose whether you want the data from the action's data sheet to be imported as a local, editable copy, or whether you want to use the (read-only) data from the original action. (Columns and data from the called action's global data sheet is always imported into the calling test as a local, editable copy.)

To modify a called, external action, you must open the test with which the action is stored and make your modifications there. The modifications apply to all tests that call that action. If you chose to use the original action's data when you call an external action, then changes to the original action's data are applied as well.

Tip: You can view the location of the original action in the General tab of the Action Properties dialog box.

To insert a call to an existing action:

  1. Select Insert > Call to Existing Action, right-click an action icon and select Insert Call to Existing Action, or right-click any step and select Action > Insert Call to Existing. The Select Action dialog box opens.

    Inserting a Call to an Existing Action
  2. Use the From test browse button to find the test that contains the action you want to call. The Action box displays all reusable actions in the test you selected.

    Note: You can enter a Quality Center folder or a relative path in the From test box.

    • If you enter a relative path, QuickTest Professional searches for the test in the folders listed in the Folders pane of the Options dialog box.

    • If you are working with the Resources and Dependencies model with Quality Center 10.00, specify an absolute Quality Center path.

  3. In the Action list, select the action you want to call. When you select an action, its type (Reusable Action) and description, if one exists, are displayed. This helps you identify the action you want to call.

    Tip: External actions that the test calls are also displayed in the list. If the action you want to call is already called from within the selected test, you can select it from the list of actions. This creates another call to the original action.

    Note: QuickTest Professional disables the Action list if the selected test does not contain any reusable or external actions.

  4. Decide where to insert the call to the action and select At the end of the test or After the current step.

    Note: If the currently selected step is a reusable action from another test, the call to the action is added automatically to the end of the test (the After the current step is disabled).

  5. Click OK. A call to the action is inserted into the test flow. You can move your action call to another location in your test by dragging it to the desired location.

    Tip: You can create an additional call to any reusable or external action in your test by pressing Ctrl while you drag and drop the action to another location at a parallel (sibling) level within your test scripts.

0 comments