The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> OpenSTA

Pages: 1
Saritha77
Newbie


Reged: 07/12/12
Posts: 5
While recording i am getting "WAIT 19813"
      #712005 - 07/12/12 02:58 AM

While recording i am getting "WAIT 19813",When i went through some docs i came to know that,Example of bad code used for transaction timers,Please have a look at my code and suggest me weather i can manually remove "WAIT xxxx"



!Browser:IE5
!Date : 7/12/2012
Environment
Description ""
Mode HTTP
Wait UNIT MILLISECONDS

Definitions
! Standard Defines
Include "RESPONSE_CODES.INC"
Include "GLOBAL_VARIABLES.INC"

CHARACTER*512 USER_AGENT
Integer USE_PAGE_TIMERS
CHARACTER*256 MESSAGE

Timer T_TST5_1
Timer T_TST5_2
Timer T_TST5_3
Timer T_TST5_4
Timer T_TST5
CHARACTER*1024 cookie_2_0
CHARACTER*1024 cookie_2_1
CHARACTER*1024 cookie_2_2
CHARACTER*1024 cookie_3_0

CONSTANT DEFAULT_HEADERS = "Host: urlfilter.vmn.net^J" &
"User-Agent: SimpleGet"
CONSTANT S_cookie_4_0 = "JSESSIONID=D796A12C4723D3771CC9E4F42EDBB311"

Code
!Read in the default browser user agent field
Entry[USER_AGENT,USE_PAGE_TIMERS]

Start Timer T_TST5

If (USE_PAGE_TIMERS=1) then
Start Timer T_TST5_1
EndIf

PRIMARY GET URI "http://urlfilter.vmn.net/vmnsbf/stamp.txt HTTP/1.1" ON 1 &
HEADER DEFAULT_HEADERS &
,WITH {"Pragma: no-cache"}

WAIT 297

GET URI &
"http://plugin.we-care.com/" &
"UpdatePlugin.php?lastUpd=20120712&readonly=1&version=4.0.19.1&id=18691493&ltvid=4e3b8d9a-a37f-4" &
"21e-8468-b39bdd01138b&plugin_type=W3i+Tri+Slider&clicks=::&subdom=aspca&browser=6.0.2900.5512&a" &
"utoclk=true&yum= HTTP/1.1" ON 2 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: plugin.we-care.com", &
"Connection: Keep-Alive"}

Load Response_Info Header on 2 &
Into cookie_2_0 &
,WITH "Set-Cookie,secure_info"

Load Response_Info Header on 2 &
Into cookie_2_1 &
,WITH "Set-Cookie,secure_id"

Load Response_Info Header on 2 &
Into cookie_2_2 &
,WITH "Set-Cookie,version"

DISCONNECT FROM 1

WAIT 19813

SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_TST5_1
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_TST5_2
EndIf

PRIMARY GET URI "http://localhost:8080/leadapp/lead.do HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
"application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, " &
"application/msword, */*", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive"}

Load Response_Info Header on 3 &
Into cookie_3_0 &
,WITH "Set-Cookie,JSESSIONID"

WAIT 78

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/main.css HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/lead.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 172

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/theme.css HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/lead.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 109

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/images/fieldbg.gif HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/lead.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 47

GET URI "http://localhost:8080/images/wflogo.png HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive"}

DISCONNECT FROM 3

WAIT 13547

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_TST5_2
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_TST5_3
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
PRIMARY POST URI &
"http://localhost:8080/leadapp/login.do;jsessionid=E8B69E0E76621A43B396B301DC3E3CD1 HTTP/1.1" &
ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
"application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, " &
"application/msword, */*", &
"Referer: http://localhost:8080/leadapp/lead.do", &
"Accept-Language: en-us", &
"Content-Type: application/x-www-form-urlencoded", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Content-Length: 54", &
"Connection: Keep-Alive", &
"Pragma: no-cache", &
"Cookie: "+cookie_3_0} &
,BODY "action=login&email=user@javachap.com&password=javachap"

WAIT 93

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/main.css HTTP/1.1" ON 5 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: " &
"http://localhost:8080/leadapp/login.do;jsessionid=E8B69E0E76621A43B396B301DC3E3CD1", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"If-None-Match: W/~<22>12260-1230364080000~<22>", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 172

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/theme.css HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: " &
"http://localhost:8080/leadapp/login.do;jsessionid=E8B69E0E76621A43B396B301DC3E3CD1", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"If-None-Match: W/~<22>2740-1230364090000~<22>", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 110

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/images/new_lead.png HTTP/1.1" ON 5 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: " &
"http://localhost:8080/leadapp/login.do;jsessionid=E8B69E0E76621A43B396B301DC3E3CD1", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

WAIT 31

GET URI "http://localhost:8080/images/iepngfix.htc HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive"}

WAIT 15

GET URI "http://localhost:8080/images/wflogo.png HTTP/1.1" ON 5 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive"}

DISCONNECT FROM 5

WAIT 9344

!Cookie Header:
!> JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_TST5_3
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_TST5_4
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
PRIMARY GET URI "http://localhost:8080/leadapp/logout.do HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
"application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, " &
"application/msword, */*", &
"Referer: " &
"http://localhost:8080/leadapp/login.do;jsessionid=E8B69E0E76621A43B396B301DC3E3CD1", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

Load Response_Info Header on 4 &
Into cookie_3_0 &
,WITH "Set-Cookie,JSESSIONID"

WAIT 78

!Cookie Header:
!> JSESSIONID=D796A12C4723D3771CC9E4F42EDBB311
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/main.css HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/logout.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"If-None-Match: W/~<22>12260-1230364080000~<22>", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_4_0}

WAIT 172

!Cookie Header:
!> JSESSIONID=D796A12C4723D3771CC9E4F42EDBB311
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/theme.css HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/logout.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"If-None-Match: W/~<22>2740-1230364090000~<22>", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_4_0}

WAIT 94

!Cookie Header:
!> JSESSIONID=D796A12C4723D3771CC9E4F42EDBB311
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=JSESSIONID=E8B69E0E76621A43B396B301DC3E3CD1
GET URI "http://localhost:8080/leadapp/css/images/fieldbg.gif HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://localhost:8080/leadapp/logout.do", &
"Accept-Language: en-us", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_4_0}

WAIT 31

GET URI "http://localhost:8080/images/wflogo.png HTTP/1.1" ON 6 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Accept-Encoding: gzip, deflate", &
"Host: localhost:8080", &
"Connection: Keep-Alive"}

DISCONNECT FROM 6

DISCONNECT FROM 4

SYNCHRONIZE REQUESTS

End Timer T_TST5

If (USE_PAGE_TIMERS=1) then
End Timer T_TST5_4
EndIf

Exit

ERR_LABEL:

If (MESSAGE <> "") Then
Report MESSAGE
Endif

Exit


Post Extras: Print Post   Remind Me!   Notify Moderator  
Vivek_V
Member


Reged: 07/26/09
Posts: 104
Loc: India
Re: While recording i am getting "WAIT 19813" [Re: Saritha77]
      #712033 - 07/12/12 07:36 AM

It's best not to use WAIT between Start and End Timers, as they get added up to your response times reported for that 'Timer'. But, you 'll need WAIT to introduce delay between request(s) so as to simulate the real time scenario.

If you think 19.8 seconds is too high you can reduce it to a more realistic number.

You can modify your scripts based on the following construct if it suits you..

START TIMER TIMER_1
PRIMARY GET URI <Request1>
PRIMARY GET URI <Requestn>
SYNCHRONIZE REQUESTS
END TIMER TIMER_1

WAIT 5000 ! wait for 5 seconds before submitting the next request

START TIMER TIMER_2

--------------------
Cheers,
Vivek


Post Extras: Print Post   Remind Me!   Notify Moderator  
Bernie VelivisModerator
Moderator


Reged: 06/02/03
Posts: 1604
Loc: Hollis, NH, USA
Re: While recording i am getting "WAIT 19813" [Re: Vivek_V]
      #712146 - 07/13/12 05:52 PM

vv_Vivekin has it right

WAIT statements pause your script.

If you insert a WAIT statement between a start and end timer, your timer will contain the elapsed time to perform the http requests PLUS a fixed wait time. Usually, wait times correspond to human actions like typing and thinking. They can also represent very small delays between requests usaually caused by client processing.

Generally speaking, don't include WAIT statements between start and end timer statements. Be sure to indicate that your results do NOT include delays due to client processing.

Also, generally speaking, don't load test using scripts without think time delays (e.g. WAIT statements). It may have it place at times, but generally speaking its not a good idea. Insert WAIT statements, usually after an END TIMER statements, to pace the scripts execution to be close to some rational usage case.

--------------------
Bernie Velivis, Performax Inc
Bernie's blog


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  SteveKay, AJ, dansut, Bernie Velivis 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2791

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5