The Generate Script from Web Service Wizard

You can generate a virtual user script from a web service using the Generate Script from Web Service wizard. To do so, you must first add the web service to your Eggplant Performance Studio Workspace. See Creating a Web Service in Managing Services in Eggplant Performance Studio for information about adding a web service in your workspace.

To use the Generate Script from Web Service wizard to create a virtual user script from a web service, follow these steps:

  1. Open Eggplant Performance Studio and display the Project tree.
  2. Right-click the Scripts folder within the Project tree.
  3. Project tree showing script options in eggPlant Performance Studio

    Generate script from web service is the option on the Scripts menu you use to create a script from a web service

  4. Select Generate script from web service from the pop-up menu. The Generate Script from Web Service wizard opens to the Choose a web service to target panel.
  5. Generate Script from Web Service wizard open to the Choose a web service to target panel in eggPlant Performance Studio

    Generate Script from Web Service wizard open to the Choose a web service to target panel in Eggplant Performance Studio

  6. Provide the information in the fields on the Choose a web service to target panel as follows:
  7. Choose service: Select the web service you want to generate the script for from the drop-down list of available web services.

    Target URL: Specify the URL for the web service.

    SOAP version: If you are targeting a SOAP service, and not a REST service, select the version of SOAP you want to use from the drop-down list. Available options are versions 1.1 and 1.2.

  8. Click Next. The Choose which web service methods you want to create calls for within the script panel opens. It lists the methods in the selected web service.
  9. Choose which methods to create calls for panel in the Generate Script from Web Service wizard

    Choose which methods to create calls for panel in the Generate Script from Web Service wizard

  10. In the Generate calls to the following methods window, select the methods you want to generate calls for and de-select any you don't.
  11. Click Next. The Choose a Custom Virtual User type panel opens. If you do not have any existing custom users, this panel looks like the one shown below. If you do have custom users, you can select an existing user from the list, or this panel will have a button Create new Custom Virtual User near the bottom of the panel that you can click to add a new custom virtual user.
  12. Choose a Custom Virtual User Type panel in the Generate Script from Web Service wizard in eggPlant Performance Studio

    Choose a Custom Virtual User Type panel in the Generate Script from Web Service wizard in Eggplant Performance Studio

  13. Either select an existing virtual user from the list under Virtual User Type, or create a new one by clicking the green plus sign and providing information in the fields under Create new Custom Virtual User as follows:
  14. Virtual User Type: Select the type of virtual user you want to create: Web Java Virtual User for Java scripts, or C# Virtual User for C# scripts.

    Name: Enter the name you want for your new custom virtual user.

    Class name: This field fills in automatically as you type the name.

    Package: or Namespace: This field also fills in automatically as you type the name. If you chose to create a Web Java Virtual User type you see the Package field on this dialog box. If you chose to create a C# user, you see the Namespace field.

  15. Click Next. The Choose a name for the script panel opens. Its Name and Package or Namespace fields contain default values.
  16. Choose a name for the script panel from the Generate Script from Web Service wizard

    Choose a name for the script panel from the Generate Script from Web Service wizard

  17. Provide the information on the Choose a name for the script panel as follows:
  18. Name: Provide a name for the script, or you can use the default name.

    Description: (Optional) Enter a description.

    Package: or Namespace: Leave the default package or namespace.

  19. If you want to change any information you entered on the panels in the wizard, click Back to return to the information you want to change. Otherwise, click Finish to close the wizard and generate the script. The Generating script dialog box opens showing you the status of the script generation.
  20. Generate script dialog box from Generate Virtual User Script wizard

    Generate script dialog box from the Create a Script wizard for web services

  21. When the Generated script... message appears, you can click Close to dismiss the Generating Script dialog box. The properties of your new script open in the Workspace Viewer pane in Eggplant Performance Studio as shown below.
  22. Properties of a virtual user script generated from a web service

 

This topic was last updated on June 21, 2019, at 02:49:50 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant