Sie sind auf Seite 1von 4

CHAPTER 2: Building a Vuser Script

Create a blank Vuser script: VuGen


Double-click VUGEN shortcut icon - view the script
Click File > New Script and Solution - see the Vuser script in a number of formats
Category is Single Protocol
Select Web-HTTP/HTML in the list of protocol and Solution Explorer
then click Create - gives structured access of Vuser script
- and number of files that are associated with the Vuser
Recording a Vuser Script script
- record the actions performed by a real user
- record actions directly into the script Step Navigator
- icon-based view of the script
Web Tours application *list actions of Vuser as step
- where you record the actions that you perform - generated a corresponding step
*Record > Recording Options. In the Recording
Options dialog box, select General > Script, and STEPS
then under Scripting Options, make sure that the 1. Start recording on the HP Web Tours website
Track processes created as COM local servers 2. Log on to HP Web Tours
check box is cleared. 3. Enter the flight details
4. Select a flight
Error opening HP Web Tours 5. Enter payment information and book the flight.
- make sure that the Web Tours Server is running. 6. Click Itinerary
7. Sign Off
Start Web Tours dialog box 8. Click the Stop Recording button on the VuGen
- server is running floating toolbar
*Start > All Programs > HP Software > HP 9. Save the Vuser script
LoadRunner > Samples > Web > Start Web
Server. In icon based desktops, such as Windows
8, search for "Start HP " and select Start HP Web
Tours Server from the results.

Recording on the HP Web Tours website


Click Record > Record or click the Record button
on the VuGen toolbar.
In the Record into action box, select Action.
From the Record list, select Web Browser.
In the Application box, make sure that Microsoft
Internet Explorer appears
In the URL address box, type
http://localhost:1080/WebTours.
Click Start Recording. A new web browser opens
and displays the HP Web Tours home page.

Log on to HP Web Tours


Username: jojo
Password: bean

Flight Details
- Departure city (Denver)
- Arrival City, select Los Angeles.
- Seating Preference, select Aisle
-Credit Card box, enter 12345678
-Exp Date box, enter 06/14.
CHAPTER 3: Replaying your Vuser Script Output pane - uses color-coding to display a textual
summary of the events
Before replaying the script, you must configure the
runtime settings for the script, which define the
behavior of the Vuser.
Steps to View Replay Log
LoadRunner runtime settings
- Click the Replay Log link in the Replay Summary tab.
- emulate different kinds of user activity and behavior
- Replay is selected in the Output pane
- emulate a user who responds immediately
- user who stops - Click Search > Quick Find to open the Search dialog
- specify how many times the Vuser should repeat box

4 Runtime Settings - From Scope, select Current Script.

Run logic - Number of times that a Vuser repeats - Click Include in search, and then select the Logs
check box.
sections
- Use the Search dialog box to locate the following
Pacing - Time to wait between repetitions items in the Replay log:

Think Time - Time the Vuser stops to think


"Virtual User Script Started"
Log - information that you want to gather during - beginning of the script run
playback
"Vuser Terminated"
STEPS - end of the script run
1. Open the Vuser script
2. Open the Runtime Settings dialog box. "Iteration"
3. Set the Run Logic settings. - the beginning and the end of each iteration and the
4. Set the Pacing settings iteration number
5. Set the Log settings - appears in orange lettering
6. View the Think Time settings

VuGen - provides a number of indicators that your


script is running.

Open the Vuser script in VuGen.


Click Replay > Run or click the Replay button on the
VuGen toolbar.

Replay Summary tab


- lists basic information about the script run
- duration of the replay
- start and end times of the replay
- log of the script events
- link that displays detailed results of the script run

Replay log
- log during the replay of the script
- displayed in VuGens Output pane

Das könnte Ihnen auch gefallen