Wednesday, March 11, 2009

Creating a Basic Script from Server Traffic (Web-Services)

While dealing with web-services based application(s), sometimes it is not possible to capture the user actions using Vugen. This might be due to application nature or something else. In this case there is an utility to create a basic LR script by using "analyze traffic" feature of web-services based script.

The actions needed for this are as follows:

1. Create a network capture file
2. Open a new web-services script in Vugen and import the WSDL.
3. Use the analyze traffice option to generate the script.

*************************
Create the capture file
*************************
You can obtain a capture file using the command line utility or any existing
capture tool.
There is a utility in Vugen's bin directory called as "lrtcpdump.exe"which can be used to create the network traffic capture file.

To create a capture file on a Windows platform:

1 Choose Start > Run, type cmd and click OK to open a command window.
2 Drag in or enter the full path of the lrtcpdump.exe program located in the
product’s bin directory.
3 Provide a file name for the capture file using the following syntax:
lrtcpdump -f
4 lrtcpdump prompts you to select a network card. If there are multiple
interface cards, it lists all of them. Type in the number of the interface card
(1, 2, 3 etc.) and click Enter.
5 Perform typical actions within your application.
6 Return to the command window and click Enter to end the capture session.

********************************************************
Use the analyze traffice option to generate the script.
********************************************************

1 Choose File > New and click New Single Protocol Script in the left pane.
2 Select the Web Services protocol and click OK.
3 Click the Analyze Traffic button or choose Vuser > Analyze Traffic. The
wizard opens.
4 Add the WSDL file location/URL and select next (optional)
5 On the next page provide the capture file information and click Finish

This will generate your basic web-services script for the action(s) performed. Then you can do your customization (parametrization and correlation) to the script.

Note: Please make sure that while making the capture file, all other TCP application(s) are closed. Only the application under test should be opened.

No comments:

Post a Comment