Showing posts with label Webload Basic. Show all posts
Showing posts with label Webload Basic. Show all posts

Wednesday, February 11, 2009

Webload Basic

Webload is a very good tool for load testing. But lacks good documents. So I decided to write blog to help users who looks for some samples and other details about webload. 

I am planning to write series of samples and explain the same. Here is the first sample and its explanation.

Sample Code - 1
/***** WLIDE - JavaScript - ID:2 *****/
wlHttp.SaveSource="Yes";
// wlHttp.SaveSource instructs webload to store the response page source of the next Get/Post request.
// Kindly remember, it will store only for next request.
wlHttp.Get("http://www.google.co.in/");
InfoMessage("Page Source : " + document.wlSource); // END WLIDE

// Stores Headers information in to variable x
x=document.wlHeaders

// Header is nothing but an key value pair.
// So Here I am printing the Key/value pair
for (i=0;i
Key " + x[i].key + " Value : " + x[i].value)
}

Explanation
1. wlHttp object stores/manages the immediate user activity that is going to happen. 
2. wlHttp.SaveSource="Yes" ==> Request webload engine to store the result page of next request(both Get and Post) in document.wlSource. This document.wlSource can be used for parameterization.
3. document.wlHeaders ==> Has information of the last header received from server. HTTP header is a key value pair. Header information will be send by server for every Get/Post request. This will be automatically stored into document.wlHeaders; no need to special instruction required like page source.

Comments are always welcome.

Happy Testing.