Tuesday, December 18, 2007

Rendezvous Point in OpenSTA

Set flag = 0

Log "Start iteration"
! Create a semaphore for the synchronization
clear TEST-WIDE semaphore "rendezvousp_pt1"
Log "Semaphore cleared"

!Check for the user load
Acquire TEST-WIDE Mutex Incr_totalAusers
Set UDLV_totalAusers = UDLV_totalAusers + 1
if (UDLV_totalAusers = 10) then
Set TEST-WIDE semaphore "rendezvousp_pt1"
Log "rendezvousp_pt1 cleared"
set flag = 1
Release TEST-WIDE Mutex Incr_totalAusers
else
Release TEST-WIDE Mutex Incr_totalAusers
wait 60000 for semaphore "rendezvousp_pt1" & , on timeout goto Label1
! this code never gets executed
Log "Semaphore set"
end if

Log "Debug trace"
Label1:
if (flag = 1) then
Log "Finally !!!"
else
Log "timeout !!!"
end if
! All users post to server now
PRIMARY URI .......
...............................
Set flag = 0


The above code snippet can be used to rendezvous enable a post

Few observations:-
1. Using script modeller to run the script the traces shown are as

1-1 :[55]:LOG: Start iteration
1-1 :[61]:LOG: Semaphore cleared
1-1 :[81]:LOG: Semaphore set
1-1 :[84]:LOG: Debug trace
1-1 :[91]:LOG: timeout !!!
--The "Semaphore set" log is not penetrated by any user in actual test but only in script modeller--


2. When used with 10 user for 5 iterations the results observed in the Audit log are

LOG: Semaphore cleared,
LOG: rendezvousp_pt1 cleared,
LOG: Debug trace,
LOG: Finally !!!,
--This happens for 5 times
no Log for timeout till now !--
LOG: timeout !!!,
--for 5 times--

3. When used with 10 user, for 5 iterations and stament as
if (UDLV_totalAusers = 5) then
then the audit log displays the following

LOG: Semaphore cleared,
LOG: rendezvousp_pt1 cleared,
LOG: Debug trace,
LOG: Finally !!!,
--this trace is displayed 9 times--
--the above sequence of traces is repeated for 4 more times--

Conculsion:
The code snippet works fine if used for half of the total virtual user load configured.
It does not seem to work fine when the user load is same as the rendezvous point user load.

Risk:
The above code has not been tested with large number of virtual user as 500 or 1000


Working Example Script for Rendezvous Point in OpenSTA

Script:

!Browser:IE5
!Date : 18-Dec-2007
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_GOOGLE_REN_1
Timer T_GOOGLE_REN_2
Timer T_GOOGLE_REN_3
Timer T_GOOGLE_REN_4
Timer T_GOOGLE_REN_5
Timer T_GOOGLE_REN
Timer search1
Timer search2
CHARACTER*1024 cookie_3_0

!Declarartion for Rendezvousp_pt1

integer flag

Integer UDLV_numofusrs


CHARACTER*1024 Thread1

CHARACTER*512 Thread2
CHARACTER*512 Thread3
CHARACTER*512 Thread4

Integer Th1

Integer Th2

Integer Th3

Integer Thf

CHARACTER*512 CTh1

CONSTANT DEFAULT_HEADERS = "Host: google.com^J" &
"Accept-Encoding: gzip, deflate^J" &
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mailinfo [1108417];"&
" InfoPath.1; MEGAUPLOAD 2.0; .NET CLR 2.0.50727)"
CONSTANT S_cookie_1_0 = &
"PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV"
CONSTANT S_cookie_5_0 = &
"SID=DQAAAHEAAABCU69-pqkayc0poHuPmD9UjV01y5WQlGxG_nTsqJP7Rr22KXM8MdQ70iDeS8AbNg0qaeLaMazqL0ohJJ" &
"MV0BLGhg09nVib9qqSgFbvn9sjg7MlPckpgUpwgBYBQwXsH8CiFRu2CFtoWYFvmvUO1xx-Om4ytV5gRI5XG3VYrMf0BA"

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

Log "Start iteration"
LOAD THREAD INTO Thread1

SET Thread2 = Thread1

SET Thread3 = ";"

SET Thread4 = Thread2 + Thread3

SET Th1 =1+~LOCATE("-",Thread4)

SET Th2 =~LOCATE(";",Thread4)

SET Th3 = Th2 - 2

! Create a semaphore for the synchronization
clear TEST-WIDE semaphore "rendezvousp_pt1"


Log "Semaphore cleared"
!Check for the user load
Acquire TEST-WIDE Mutex "Incr_numofusrs"

SET CTh1 =~EXTRACT(Th1,Th3,Thread4)
!LOG CTh1

CONVERT CTh1 to Thf
log Thf

Set UDLV_numofusrs = UDLV_numofusrs + 1
if (UDLV_numofusrs = 1) then
Set TEST-WIDE semaphore "rendezvousp_pt1"
Log "rendezvousp_pt1 cleared"
set flag = 1
Release TEST-WIDE Mutex "Incr_numofusrs"
else
Release TEST-WIDE Mutex "Incr_numofusrs"
wait 60000 for semaphore "rendezvousp_pt1" on timeout goto Label1
! this code never gets executed
Log "Semaphore set"
end if

Log "Debug trace"
Label1:
if (flag = 1) then
Log "Finally !!!"
else
Log "timeout !!!"
end if

Start Timer T_GOOGLE_REN
!Cookie Header:
!> PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV

If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_1
EndIf

!Fake Cookies:
PRIMARY GET URI "http://google.com/ HTTP/1.1" ON 1 &
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", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_1_0}

DISCONNECT FROM 1

!Wait 875

!Cookie Header:
!> PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_1
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_2
EndIf

!Fake Cookies:
PRIMARY GET URI "http://www.google.com/ HTTP/1.1" ON 2 &
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", &
"UA-CPU: x86", &
"Host: www.google.com", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_1_0}

DISCONNECT FROM 2

!Wait 390

SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_2
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_3
EndIf

PRIMARY GET URI "http://www.google.co.in/ 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", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in"}

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

!Wait 1203

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/intl/en_com/images/logo_plain.png HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

!Wait 343

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/favicon.ico HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"UA-CPU: x86", &
"Host: www.google.co.in", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/images/nav_logo3.png HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}
Start Timer search1
DISCONNECT FROM 3

DISCONNECT FROM 4

!Wait 8547

!Cookie Header:
!> SID=DQAAAHEAAABCU69-pqkayc0poHuPmD9UjV01y5WQlGxG_nTsqJP7Rr22KXM8MdQ70iDeS8AbN
!g0qaeLaMazqL0ohJJMV0BLGhg09nVib9qqSgFbvn9sjg7MlPckpgUpwgBYBQwXsH8CiFRu2CFtoWYFv
!mvUO1xx-Om4ytV5gRI5XG3VYrMf0BA; PREF=ID=88fefb45051c29f7:TM=1197960540:LM=11979
!60540:S=wGz-KPlcePUsfydV
!Fake Cookies:
GET URI &
"http://www.google.com/uds/" &
"GnewsSearch?callback=GnewsSearch.RawCompletion&context=0&lstkp=0&rsz=small&hl=en&gss=.com&sig=d" &
"129859d95ee150ccb61ba4f992eda69&q=%20Google&key=ABQIAAAAVBJEtyJuLxgUs8KlzeA1lRRexG7zW5nSjltmIc1" &
"ZE-b8yotBWhQCAqymr8sfNdtXcWxm9PMHAFF7rw&v=1.0&nocache=1197969018813 HTTP/1.1" ON 5 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://radiumtesting.blogspot.com/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.com", &
"Cookie: "+S_cookie_5_0+"; "+S_cookie_1_0}

!Wait 3000

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_3
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_4
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
PRIMARY GET URI "http://www.google.co.in/search?hl=en&q=opensta&meta= HTTP/1.1" ON 6 &
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://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

End Timer search1
!Wait 6094
Set flag = 0

DISCONNECT FROM 5,WITH CANCEL

Start Timer search2
DISCONNECT FROM 6

!Wait 27078

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_4
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_5
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
PRIMARY GET URI "http://www.google.co.in/search?hl=en&q=radiumtesting&meta= HTTP/1.1" ON 7 &
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://www.google.co.in/search?hl=en&q=opensta&meta=", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

DISCONNECT FROM 7

End Timer search2
SYNCHRONIZE REQUESTS

End Timer T_GOOGLE_REN
If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_5
EndIf

set flag =0
Exit

ERR_LABEL:

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

Exit

LOG Details During Execution

1197982105,TestManager Initialized for Test TEST,
1197982106,Task Group 1 started,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|92|LOG: 1,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|92|LOG: 7,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|92|LOG: 3,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|92|LOG: 5,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-1|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-7|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|92|LOG: 12,
1197982106,TExecuter_HTP.exe|4244|1-3|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-5|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|92|LOG: 4,
1197982106,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|65|LOG: Start iteration,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|84|LOG: Semaphore cleared,
1197982106,TExecuter_HTP.exe|4244|1-12|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|92|LOG: 10,
1197982106,TExecuter_HTP.exe|4244|1-4|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-10|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|92|LOG: 6,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|92|LOG: 8,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-6|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-8|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|92|LOG: 11,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|92|LOG: 9,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-11|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-9|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|92|LOG: 14,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|92|LOG: 13,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|107|LOG: Debug trace,
1197982106,TExecuter_HTP.exe|4244|1-14|GOOGLE_REN|110|LOG: Finally !!!,
1197982106,TExecuter_HTP.exe|4244|1-13|GOOGLE_REN|110|LOG: Finally !!!,
1197982107,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|92|LOG: 2,
1197982107,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982107,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|107|LOG: Debug trace,
1197982107,TExecuter_HTP.exe|4244|1-2|GOOGLE_REN|110|LOG: Finally !!!,
1197982107,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|92|LOG: 15,
1197982107,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|97|LOG: rendezvousp_pt1 cleared,
1197982107,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|107|LOG: Debug trace,
1197982107,TExecuter_HTP.exe|4244|1-15|GOOGLE_REN|110|LOG: Finally !!!,
1197982149,Task Group 1 completed,

2 comments:

free testing source said...

1. There is no limit for Vusers.
2. Vuser Parameterization.
3. Ram UP, Run Test specific Duration Time and Ram Down like loadrunner
4. Inserting Rendezvous point
5. Inserting Start transaction and End transaction (you will get the values for every transaction in results)

Global said...

!Browser:IE5
!Date : 18-Dec-2007
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_GOOGLE_REN_1
Timer T_GOOGLE_REN_2
Timer T_GOOGLE_REN_3
Timer T_GOOGLE_REN_4
Timer T_GOOGLE_REN_5
Timer T_GOOGLE_REN
Timer search1
Timer search2
CHARACTER*1024 cookie_3_0

!Declarartion for Rendezvousp_pt1

integer flag

Integer UDLV_numofusrs


CHARACTER*1024 Thread1

CHARACTER*512 Thread2
CHARACTER*512 Thread3
CHARACTER*512 Thread4

Integer Th1

Integer Th2

Integer Th3

Integer Thf

CHARACTER*512 CTh1

CONSTANT DEFAULT_HEADERS = "Host: google.com^J" &
"Accept-Encoding: gzip, deflate^J" &
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mailinfo [1108417];"&
" InfoPath.1; MEGAUPLOAD 2.0; .NET CLR 2.0.50727)"
CONSTANT S_cookie_1_0 = &
"PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV"
CONSTANT S_cookie_5_0 = &
"SID=DQAAAHEAAABCU69-pqkayc0poHuPmD9UjV01y5WQlGxG_nTsqJP7Rr22KXM8MdQ70iDeS8AbNg0qaeLaMazqL0ohJJ" &
"MV0BLGhg09nVib9qqSgFbvn9sjg7MlPckpgUpwgBYBQwXsH8CiFRu2CFtoWYFvmvUO1xx-Om4ytV5gRI5XG3VYrMf0BA"

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

Log "Start iteration"
LOAD THREAD INTO Thread1

SET Thread2 = Thread1

SET Thread3 = ";"

SET Thread4 = Thread2 + Thread3

SET Th1 =1+~LOCATE("-",Thread4)

SET Th2 =~LOCATE(";",Thread4)

SET Th3 = Th2 - 2

! Create a semaphore for the synchronization
clear TEST-WIDE semaphore "rendezvousp_pt1"


Log "Semaphore cleared"
!Check for the user load
Acquire TEST-WIDE Mutex "Incr_numofusrs"

SET CTh1 =~EXTRACT(Th1,Th3,Thread4)
!LOG CTh1

CONVERT CTh1 to Thf
log Thf

Set UDLV_numofusrs = UDLV_numofusrs + 1
if (UDLV_numofusrs = 1) then
Set TEST-WIDE semaphore "rendezvousp_pt1"
Log "rendezvousp_pt1 cleared"
set flag = 1
Release TEST-WIDE Mutex "Incr_numofusrs"
else
Release TEST-WIDE Mutex "Incr_numofusrs"
wait 60000 for semaphore "rendezvousp_pt1" on timeout goto Label1
! this code never gets executed
Log "Semaphore set"
end if

Log "Debug trace"
Label1:
if (flag = 1) then
Log "Finally !!!"
else
Log "timeout !!!"
end if

Start Timer T_GOOGLE_REN
!Cookie Header:
!> PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV

If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_1
EndIf

!Fake Cookies:
PRIMARY GET URI "http://google.com/ HTTP/1.1" ON 1 &
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", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_1_0}

DISCONNECT FROM 1

!Wait 875

!Cookie Header:
!> PREF=ID=88fefb45051c29f7:TM=1197960540:LM=1197960540:S=wGz-KPlcePUsfydV
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_1
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_2
EndIf

!Fake Cookies:
PRIMARY GET URI "http://www.google.com/ HTTP/1.1" ON 2 &
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", &
"UA-CPU: x86", &
"Host: www.google.com", &
"Connection: Keep-Alive", &
"Cookie: "+S_cookie_1_0}

DISCONNECT FROM 2

!Wait 390

SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_2
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_3
EndIf

PRIMARY GET URI "http://www.google.co.in/ 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", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in"}

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

!Wait 1203

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/intl/en_com/images/logo_plain.png HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

!Wait 343

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/favicon.ico HTTP/1.1" ON 3 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"UA-CPU: x86", &
"Host: www.google.co.in", &
"Connection: Keep-Alive", &
"Cookie: "+cookie_3_0}

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
GET URI "http://www.google.co.in/images/nav_logo3.png HTTP/1.1" ON 4 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}
Start Timer search1
DISCONNECT FROM 3

DISCONNECT FROM 4

!Wait 8547

!Cookie Header:
!> SID=DQAAAHEAAABCU69-pqkayc0poHuPmD9UjV01y5WQlGxG_nTsqJP7Rr22KXM8MdQ70iDeS8AbN
!g0qaeLaMazqL0ohJJMV0BLGhg09nVib9qqSgFbvn9sjg7MlPckpgUpwgBYBQwXsH8CiFRu2CFtoWYFv
!mvUO1xx-Om4ytV5gRI5XG3VYrMf0BA; PREF=ID=88fefb45051c29f7:TM=1197960540:LM=11979
!60540:S=wGz-KPlcePUsfydV
!Fake Cookies:
GET URI &
"http://www.google.com/uds/" &
"GnewsSearch?callback=GnewsSearch.RawCompletion&context=0&lstkp=0&rsz=small&hl=en&gss=.com&sig=d" &
"129859d95ee150ccb61ba4f992eda69&q=%20Google&key=ABQIAAAAVBJEtyJuLxgUs8KlzeA1lRRexG7zW5nSjltmIc1" &
"ZE-b8yotBWhQCAqymr8sfNdtXcWxm9PMHAFF7rw&v=1.0&nocache=1197969018813 HTTP/1.1" ON 5 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: */*", &
"Referer: http://radiumtesting.blogspot.com/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.com", &
"Cookie: "+S_cookie_5_0+"; "+S_cookie_1_0}

!Wait 3000

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_3
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_4
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
PRIMARY GET URI "http://www.google.co.in/search?hl=en&q=opensta&meta= HTTP/1.1" ON 6 &
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://www.google.co.in/", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

End Timer search1
!Wait 6094
Set flag = 0

DISCONNECT FROM 5,WITH CANCEL

Start Timer search2
DISCONNECT FROM 6

!Wait 27078

!Cookie Header:
!> PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=SwjW9SYlqk7RBjOI
SYNCHRONIZE REQUESTS


If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_4
EndIf


If (USE_PAGE_TIMERS=1) then
Start Timer T_GOOGLE_REN_5
EndIf

!Fake Cookies:
!> ~GaTeWaY_cookie_3_0=PREF=ID=0a9368928f9fa8f6:TM=1197969119:LM=1197969119:S=Swj
!W9SYlqk7RBjOI
PRIMARY GET URI "http://www.google.co.in/search?hl=en&q=radiumtesting&meta= HTTP/1.1" ON 7 &
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://www.google.co.in/search?hl=en&q=opensta&meta=", &
"Accept-Language: en-us", &
"UA-CPU: x86", &
"Connection: Keep-Alive", &
"Host: www.google.co.in", &
"Cookie: "+cookie_3_0}

DISCONNECT FROM 7

End Timer search2
SYNCHRONIZE REQUESTS

End Timer T_GOOGLE_REN
If (USE_PAGE_TIMERS=1) then
End Timer T_GOOGLE_REN_5
EndIf

set flag =0
Exit

ERR_LABEL:

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

Exit