Call external tests or actions

Relevant for: API testing only

This task describes how to incorporate tests from other HPE applications. You can call any of the following types of tests:

  • Unified Functional Testing tests (both GUI and API tests)

  • QuickTest Professional tests

  • Service Test tests

  • VuGen (Virtual User Generator ) scripts from HPE LoadRunner

Prerequisites

Make sure you have installed the application whose test/script you want to call on the same computer with UFT or have access to the directory containing the tests or scripts.

Example:  

  • If you are calling a test last modified in a version of Service Test prior to your present version, make sure the test was modified with Service Test 11.10 or higher or UFT.

  • To call a test created in QuickTest Professional, ensure that the test was created with QuickTest 11.00. The first time you run the step, you may need to wait several seconds for UFT to invoke and load the test.

  • If you are calling a test created in LoadRunner, ensure that you created or opened the test in LoadRunner version 11.00 or later.

Back to top

Call an API Test or Action or Service Test test

  1. Make sure the action or test you want to call has been saved and run successfully at least once.

  2. In the Standard Activities section of the Toolbox pane, expand the HPE Automated Testing Tools node.

  3. Add a Call API Action or Test activity to the canvas.

  4. In the Input/Output Properties tab in the Properties pane, click the Select Action or Test button.

  5. In the Select Action or Test Dialog Box, select a test last modified with Service Test 11.10 or higher, or with UFT.

  6. In the Input/Output Properties tab, edit the property values as needed.

    Note:  

    • The property list remains empty until you select a test.

    • If the test you are calling has no input or output parameters, the Input/Output Properties tab will be empty.

  7. Add other relevant steps to your test. You can link input properties of subsequent step to the output properties of the step containing the called API test or action..

  8. If the value of the input parameter for step containing the API test/action call must be a string (such when the result of a previous step was XML), add an XML to String activity before the step containing the call to the action or test.

  9. Optional - To specify a custom directory for the results, in the General tab of the Properties, click the Browse button in the Results directory row in the General view tab.

Back to top

Call a GUI Test or QuickTest action or test

  1. Make sure the action or test you want to call has been saved and run successfully at least once.

  2. In the Toolbox pane, in the Standard Activities section, expand the HPE Automated Testing Tools node.

  3. Drag the Call GUI Action or Test activity onto the canvas.

    Note: This activity is only available when working with an HPE Unified Functional Testing license.

    Tip: Do not insert a call to a QuickTest or GUI action or test that contains a call to an API Test action or test, as this can cause unexpected behavior.

  4. In the Input/Output Properties tab in the Properties pane, click the Select Action or Test button. In the Select Action or Test Dialog Box, select an action or a test.

  5. In the Select Action or Test Dialog Box, select an action or a test created in QuickTest 11.00 or UFT.

    Note: If you want to use data from a GUI test in your API test, the GUI test or action that is called must have test or action parameters saved with the test or action.

  6. In the Input/Output Properties tab, edit the property values as needed. If you want to use parameters from the called GUI test, in the Input/Checkpoints tab, click the Link to data source button in subsequent test steps. In the Select Link Source dialog box, link the selected property to a GUI test or action parameter.

    Note:  

    • The property list remains empty until you select a test.

    • If the test you are calling has no input or output parameters, the Input/Output Properties tab will be empty.

Back to top

Add a LoadRunner script activity

  1. Make sure the action or test you want to call has been saved and run successfully at least once.

  2. In the Toolbox pane, in the Standard Activities section, expand the HPE Automated Testing Tools node.

  3. Add a Call Virtual User Generator Script activity to the canvas.

  4. In the Properties pane, select the General tab, and click the script selection button .

  5. Navigate to the directory where your VuGen script file (.usr) is saved.

Back to top