Professional Documents
Culture Documents
*************************************
Dim StartTime, EndTime, StartTime1, EndTime1
With Dialog(Login)
.WinEdit(Agent Name:).Set mercury
.WinEdit(Agent Name:).Type micTab
.WinEdit(Password:).SetSecure 4864ede3f3f8f30757cf694e3e100d29bf1ea9b9
.WinEdit(Password:).Type micReturn
End With
StartTime = Timer
With Window(Flight Reservation)
For i=1 to 1000
.WinEdit(Name:).Set Ankur
Next
End With
EndTime = Timer
msgbox EndTime StartTime
result: 41.71875
Window(Flight Reservation).Close
With Dialog(Login)
.WinEdit(Agent Name:).Set mercury
.WinEdit(Agent Name:).Type micTab
.WinEdit(Password:).SetSecure 4864ede3f3f8f30757cf694e3e100d29bf1ea9b9
.WinEdit(Password:).Type micReturn
End With
StartTime1 = Timer
For i=1 to 1000
Window(Flight Reservation).WinEdit(Name:).Set Ankur
Next
EndTime1 = Timer
msgbox EndTime1 StartTime1
result1: 45.85938
******************************
This experiment was carried out on my machine which has 2GB RAM. With 1000
iterations the diff is > 4 secs. I think the effect (performance degradation) should be much
more pronounced on larger tests and if it is carried out on machines having configuration
just on threshold (512MB- one which is min RAM recommended by HP).
In case of With statement, the ref to the function Window() is getting stored at one
place(RAM) and it gets referenced (w/o going to OR on each iteration) while without
With the function Window() and WinEdit() both are called on each iteration and probably
that is responsible for the delay.
Please dont get annoyed for my excessive usage of the term RAM I have been
reading a lot on performance testing, memory leakage etc these days.
Now I see what you mean. I tried the same code on my laptop, and the performance
difference was more pronounced. 43.26563s and 68.92188s respectively.
Then I tried it the way that I would normally handle this situation:
This took only 15.48438s, but I immediately realized it wasnt a valid comparison. It was
faster because it set an object for the WinEdit and didnt have to find it each time. So I
changed it to this:
This took 41.84375s. A slight improvement over the with statement, but close enough to
not make a big difference.
Here is a small experiment with windows based flight reservation sample application.
*************************************
Dim StartTime, EndTime, StartTime1, EndTime1
SystemUtil.Run C:\Program Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe,",C:\Program Files\Mercury
Interactive\QuickTest Professional\samples\flight\app\,open
With Dialog(Login)
.WinEdit(Agent Name:).Set mercury
.WinEdit(Agent Name:).Type micTab
.WinEdit(Password:).SetSecure 4864ede3f3f8f30757cf694e3e100d29bf1ea9b9
.WinEdit(Password:).Type micReturn
End With
StartTime = Timer
With Window(Flight Reservation)
For i=1 to 1000
.WinEdit(Name:).Set Ankur
Next
End With
EndTime = Timer
msgbox EndTime StartTime
result: 41.71875
Window(Flight Reservation).Close
With Dialog(Login)
.WinEdit(Agent Name:).Set mercury
.WinEdit(Agent Name:).Type micTab
.WinEdit(Password:).SetSecure 4864ede3f3f8f30757cf694e3e100d29bf1ea9b9
.WinEdit(Password:).Type micReturn
End With
StartTime1 = Timer
For i=1 to 1000
Window(Flight Reservation).WinEdit(Name:).Set Ankur
Next
EndTime1 = Timer
result1: 45.85938
******************************
This experiment was carried out on my machine which has 2GB RAM. With 1000
iterations the diff is > 4 secs. I think the effect (performance degradation) should be much
more pronounced on larger tests and if it is carried out on machines having configuration
just on threshold (512MB- one which is min RAM recommended by HP).
In case of With statement, the ref to the function Window() is getting stored at one
place(RAM) and it gets referenced (w/o going to OR on each iteration) while without
With the function Window() and WinEdit() both are called on each iteration and probably
that is responsible for the delay.
Please dont get annoyed for my excessive usage of the term RAM I have been
reading a lot on performance testing, memory leakage etc these days.
Now I see what you mean. I tried the same code on my laptop, and the performance
difference was more pronounced. 43.26563s and 68.92188s respectively.
Then I tried it the way that I would normally handle this situation:
This took only 15.48438s, but I immediately realized it wasnt a valid comparison. It was
faster because it set an object for the WinEdit and didnt have to find it each time. So I
changed it to this:
This took 41.84375s. A slight improvement over the with statement, but close enough to not
make a big difference. SPMS TEST SCRIPTS SAMPLE
The following sample is a subset of the test scripts contained within the sample document. The
total volume of actual test scripts is lengthy and the subset illustrates what the test scripts look
like.
Please Note
All Test Results will be verified using System Inquiry functions and Tickler Lists where possible.
This will allow for testing of these functions without explicitly specifying that they will be done.
Set the System Date to March 1, 2005.
1. Add Offices;640, 511, 121, 406, 646, 515, Offices are added to the Table with a Status of
527, 999, 318 ACTIVE (1).
1. Add Event Codes; 0100, 0105, 0110, 0120, Event Codes are added to the Event Code Table
0125, 0130, 0140, 0150, 0160, 0165, 0170, with a Status of ACTIVE (1).
0180, 0190, 0200, 0210, 0220, 0230, 0240,
0250, 0260, 0270, 0280, 1000, 1010, 1020:
2. Change Event Codes Event Codes are updated on the Event Code Table.
3. Delete Event Codes Event Codes are updated on the Event Code Table
with a Status of INACTIVE (0).
1. Add Offices;640, 511, 121, 406, 646, 515, Offices are added to the Table with a Status of
527, 999, 318 ACTIVE (1).
2. Add Global Message Invalid Action: Only one global message can exist
on this file.
1. Add Offices;640, 511, 121, 406, 646, 515, Offices are added to the Table with a Status of
527, 999, 318 ACTIVE (1).
1. Add Offices;640, 511, 121, 406, 646, 515, Offices are added to the Table with a Status of
527, 999, 318 ACTIVE (1).
1. Add Provincial Minimum Wage Minimum Wages are added to the Provincial
Minimum Wage Table
1. Add CPP Rate CPP Rates are added to the CPP Rate Table.
2. Change CPP Rate: CPP Rate is updated on the CPP Rate Table.
1. Add Provincial Minimum Wage Minimum Wages are added to the Provincial
Minimum Wage Table
1. Add Economic Region Code Economic Region Codes are added to the
Economic Region Code Table.
3. Delete Economic Region Code: Economic Region Code is deleted from the
database.
Inquire on each Participant and select to Participants listed on the Name Search are
print the Initiation Forms; 46400101, correct.
64000103, 52700105, Carrot Patricia, Corn
Thomas K.
Data Displayed in Participant Inquiry is
accurate.
Inquire on each Participant and select to Participants listed on the Name Search are
print the Initiation Forms; 12100111, correct.
31800113, Five Leslie C
Data Displayed in Participant Inquiry is
accurate.
Update Orientation Date on the following Orientation Date is updated on the Participant
participants to March 15, 2005: 46400101, records.
64000103, 52700105, 51100107, 52700109,
12100111, 31800113, 64000115
Update Orientation Date on the following Orientation Date is updated on the Participant
participants to March 22, 2005: 31800117, records.
51100119, 46400121, 64000123, 52700125,
51100127, 52700129, 12100131