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.

2 comments:

  1. hi! i have a problem with webload, maybe you can help me. webload does not record nor display in the "browser view" the page i need to test. i can't tell the address of the page i am testing but i can say that it needs the "modify headers" add on from Mozilla to be displayed. so.. any ideas? google or other internet pages are available.

    ReplyDelete
  2. I think you are right. I was pleased when I heard one of my student saying, "I like it here because you are not a bunch of eggheads." We definitely hire tutors who can develop a positive rapport with the student.

    Lace Curtains

    ReplyDelete