|
Description
Think Time Assigned to web_url(); Step Even Though None Specified.
Solution
Even though not specified, in the script code below think time was being assigned to the web_url("default.asp") step.
With think time enabled there is a 10 second pause on that step. Disabling think time allows it to go right on through immediately.
The think time can also be seen in the results analysis tool when the include think time graph filter is enabled.
Very helpful service request response:
"There are some occasions while running a script that LoadRunner will insert it's own think times. One occasion is when it gets a 401 error. Some times a server will issue a 401 error to a request that has an incorrect cookie set. LoadRunner upon getting the error will wait 10 seconds and then re request the resource. This time however the correct cookie value will be sent."
"The existence of the 401 error is required for your site to work correctly. The way it works is like this. The first time you access the particular URL, or if you are returning to the URL in a new session, the server needs to Authenticate/ Assign a session ID to you. It does this by giving you a cookie. So, you ask for the URL, the server sends you a HTTP 401 error, and in the error it sets a cookie. You then re request the URL, this time with a valid cookie set, and the server sends you the requested resource."
"Without the 401 error being returned, you couldn't have a new cookie set. Without the new cookie, you can't be granted access by the server."
"What we need to do here is get LoadRunner to make the re-request without waiting the 10 seconds. To do this, please add the following to the [Web] section of the default.cfg file in the script folder."
Retry401ThinkTime=0
"After making the change, when you run the script from VuGen, or when you incorporate it into new scenario, or delete and re add it to existing scenarios, it will no longer wait for the 10 seconds before re requesting the resource."
.....................................................
Script Code Example:
lr_start_transaction("Login");
web_set_user("{UserID}",
"{Password}",
"{DOMAIN}:{PORT}");
web_add_cookie("ASPSESSIONIDGQQGQUBK=NCGHOMICNKKDLCKEINNDDHHN; DOMAIN={DOMAIN}");
web_url("default.asp",
"URL=http://{DOMAIN}:{PORT}/{PATH}/default.asp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_end_transaction("Login", LR_AUTO) |
|