LoadRunner can create Vugen script from any captured traffic files such as .cap
, .pcap
, .saz
or .har
which are usually captured using tools like Fiddler, HTTPWatch, Chrome DevTools etc.
Capture traffic using Fiddler
First step is to prepare your capture archive file. If you are new to fiddler, you might want to read it here. Anyways, let’s continue with the steps:
-
Lets open up fiddler, start capturing the http traffic and launch chrome.
-
Navigate to
https://duckduckgo.com
in Chrome and search forhappy hour
. You should see something like below in fiddler: -
Add comments in fiddler session by pressing m or right-click for options:
-
Save all sessions in an fiddler archive file (
DuckDuckGo.saz
)
Create LR Script
When it comes to generating LR scripts out of captured file, it’s fairly easy and we have couple of options
Usual way
-
Create new test in LoadRunner VuGen:
-
New vuser (virtual user) script looks like following figure:
-
Click Start Recording, select Captured Traffic File Analysis in Record, browse and select the
DuckDuckGo.saz
file and hit start recording! -
When above step is finished processing, you have a full fledged Vugen script. Voila!
Alternate way
If your LR was installed properly, you could also right-click on any captured traffic file (.cap, .pcap, .saz or .har
) and select Create VuGen script.
Note: this only works with protocols: Web - HTTP/HTML, Flex, SAP - Web, and Siebel - Web.