How to Edit VAPI-XP Test Scripts

After you have created a VAPI-XP test script using the Micro Focus VAPI-XP Wizard, you can edit it in the Test Script tab.

To learn more about VAPI-XP tests, see VAPI-XP Tests Overview.

Tip: You can display the Test Script tab in a separate window by selecting View > Window Screen, or clicking the Window Screen button .

To edit a VAPI-XP test script:

  1. In the test plan tree, select a VAPI-XP test, and click the Test Script tab. The test script is displayed.

  2. Note: To view or edit the properties of the test script you created, choose Test > Properties.

  3. To view a list of object definitions, methods, and properties that you can add to your script, select one of the following options:

    • Test > References > COM Library References. Opens the References dialog box in which you can choose the COM object definitions, methods, and properties you want to view.

    • Test > References > SOAP Web Service References. Opens the Add Web Service Reference dialog box in which you can type the Web service object definition or method you want to view.

    • Test > References > Java Class References. Opens the Add Java Class Reference dialog box in which you can type the Java class object definition or method you want to view.

  4. Select View > Browsers, or click the Show/Hide Browsers button . The following tabs are displayed.

    • Library tab. Displays a list of VAPI-XP (SRunner), ALM (TDAPIOLELib), and COM/DCOM object definitions, methods, and properties that you can add to your script. For an explanation of VAPI-XP object definitions, methods, and properties, see How to Use the VAPI-XP API. For an explanation of ALM object definitions, methods, and properties, refer to the ALM Open Test Architecture API Reference.

    • Soap tab. Displays a list of Web service object definitions and methods that you can add to your script.

    • Java tab. Displays a list of Java class object definitions and methods that you can add to your script.

    • Function tab. Displays a list of functions contained in your script.

    • Object tab. Displays a list of objects with defined names that you can add to your script.

    • Note: For a description of each object definition, method, or property, select View > Output, and click the Help tab.

  5. To add an object definition, method, or property to the current function in your script, place the cursor in the appropriate place in your code, and double-click the object definition, method, or property in the Library, Soap, or Java tabs.

  6. To add an object with a defined name, select the object definition, method, or property in the Library, Soap, or Java tabs, and choose Test > Add Object. In the Add Object dialog box, type the name you want to assign to the object and click OK. The object is added to the Object tab.

  7. To add the object to your script, double-click the object, or right-click it and select Insert into Script.

  8. To check the syntax of your code, choose Test > Check Syntax, or click the Syntax Check button . Select View > Output to view the verification results in the Output tab.

  9. To perform additional editing functions in the Test Script tab, see Additional Editing Functions.