To use the Generate Script from Web Service wizard to create a virtual user script from a web service, follow these steps:
- Open Eggplant Performance Studio and display the Project tree.
- Right-click the Scripts folder within the Project tree.
- 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.
- Provide the information in the fields on the Choose a web service to target panel as follows:
- 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.
- 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.
- 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.
- 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:
- Click Next. The Choose a name for the script panel opens. Its Name and Package or Namespace fields contain default values.
- Provide the information on the Choose a name for the script panel as follows:
- 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.
- 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.
Generate script from web service is the option on the Scripts menu you use to create a script from a web service
Generate Script from Web Service wizard open to the Choose a web service to target panel in Eggplant Performance Studio
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.
Choose which methods to create calls for panel in the Generate Script from Web Service wizard
Choose a Custom Virtual User Type panel in the Generate Script from Web Service wizard in Eggplant Performance Studio
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.
Choose a name for the script panel from the Generate Script from Web Service wizard
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.
Generate script dialog box from the Create a Script wizard for web services