Showing posts with label Extrares in Loadrunner. Show all posts
Showing posts with label Extrares in Loadrunner. Show all posts

Extrares in Loadrunner

Extrares in Loadrunner which generates while recording WEB-HTTP/HTML protocol applications i.e web applications. Extrares records all available resources for each and every particular web url for example http://www.wikishown.com. We will see Extrares with examples and how it impact the response time of your web applications.

Extrares in Loadrunner


What is Extrares in Loadrunner,While generating or recording the test scripts in VUGen (Virtual User Generator) records each and every web url and in order to load that particular url it will check what are the extra files are associated with particular web url. As Extrares loads see below recorded code for more information.
web_url("wikishown", 
"URL=http://www.wikishown.com",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
EXTRARES,
"Url=images/bb_h_img2.jpg", ENDITEM,
"Url=images/bb_h_img1.jpg", ENDITEM,
"Url=images/bb_h_img3.jpg", ENDITEM,
"Url=images/loadingAnimation.gif", ENDITEM,
"Url=../favicon.ico", "Referer=", ENDITEM,
LAST);

EXTRARES recording all available images,java-script,j query, css files before loading the particular URL or pages in Virtual User Generator and while executing the Action first of all it will load all available resources i.e images,css etc files then it move to next step for execution,Here you will face problems for downloading resources because some time VUGen takes more time ,some time takes less times.

What should do in case Timeout for downloading resources


You can take below following below steps in order to overcome the problems,those are

1.Comment the EXTRARES in the script.
2.Increase Step download Timeout(Sec).
3.You can use web_set_timeout() function.

In case EXTRARES are commented while executing the Test script then it is not possible to estimate or calculate average response time for application transactions.It will look like below with comments.As per below script EXTRARES will not load and it will execute the step successfully.
web_url("wikishown", 
"URL=http://www.wikishown.com",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
/*EXTRARES,
"Url=images/bb_h_img2.jpg", ENDITEM,
"Url=images/bb_h_img1.jpg", ENDITEM,
"Url=images/bb_h_img3.jpg", ENDITEM,
"Url=images/loadingAnimation.gif", ENDITEM,
"Url=../favicon.ico", "Referer=", ENDITEM, */
LAST);

Step Download Timeout


Step download Timeout is one of the run time setting menu under Internet Protocols,please read Step Download Timeout(Sec) post for more details.Coming to third point you can use web_set_timeout("STEP","") function to increase the timeout before web_url() in order to specify more time for downloading available resources.The script looks like below with web_set_timeout().
web_set_timeout("STEP","60");
web_url("wikishown",
"URL=http://www.wikishown.com",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
/*EXTRARES,
"Url=images/bb_h_img2.jpg", ENDITEM,
"Url=images/bb_h_img1.jpg", ENDITEM,
"Url=images/bb_h_img3.jpg", ENDITEM,
"Url=images/loadingAnimation.gif", ENDITEM,
"Url=../favicon.ico", "Referer=", ENDITEM, */
LAST);

Let's understand the line web_set_timeout("STEP","60") ,here STEP indicates Time–out on each VuGen step ,indicates on which step timeout should apply.
STEP - indicates on which step timeout should apply
60 - Indicates how many seconds.

I hope you got good information on Extrares in Loadrunner,in case you like my post please provide your valuable comments and suggestions.Thank you for reading my website.