Today I’m here to show you how to use one of the easiest scripting protocols on LoadRunner, WebService. Being simple doesn’t mean that the protocol it’s not powerful. A lot of large enterprise applications and web portals use WebServices on the back office processes.
There are several ways of scripting this king of application, but today I’ll show how to use .NET WSDL files to create a simple script. Instead of pasting several images on the post I thought it would be more productive to record a screen cast. So here it is, the first video guide of this blog:
The steps are very simple, not much to be done!
- Create a new single protocol script using the Web Service protocol.
- Click on the “Manage Services” button on the top left corner.
- Click on the “Import” button.
- Select URL and then paste your WSDL file URL Remember that it should include the “?WSDL” string at the end.
- Click on the “Import” button and then OK.
- Back to the script view, click on the “Add Service Call” button.
- Select the service you just added on the “Service” drop down list.
- Select the call you want to add on the “Operation” drop down list.
- At this point, you will see a list of parameters (Input and Output) on the middle box.
- The Input parameters are the parameters you will use on your request. On the opposite way, Output parameters are the parameters returned by the server.
- Some input parameters are required and some are optional. You will notice the difference on the “Include argument in call” checkbox.
- The required parameters have this checkbox disabled.
- With this checkbox you can add optional parameters to the request.
- You can also set the values you’ll be sending by filling the “Value” text box.
- You can save the returned parameters by selecting the desired parameter under “Output Arguments” and selecting the “Save returned value in parameter” checkbox.
- Once you’re done with the arguments selection, click on the OK button. This will add the request to the script.
- Once the code is created, you can replace parameters, add static arguments and all sorts of things that can only be done in LoadRunner.
- Returned values will be saved on the selected parameters to be used later, in case you have more than once call per script (sequential steps).
That’s It! On the next guide I plan to show you how to create WebService scripts using application trace files.
See you next time!