4
Playing Back Your
Script
By recording a set of typical user
actions such as booking a flight, you
created a real user emulation. You
replay your recorded script to verify that
it runs properly before you
incorporate it into a load testing scenario.
During replay, you can view the
actions in a browser and see if everything is
as you expect it be. If the script
doesn’t replay properly, you may need to
add correlations, as described in
Lesson 5, “Solving Common Playback
Problems.”
Before replaying the script, you can
configure run-time settings, which help
you set the behavior of the Vuser.
In this lesson you will cover the
following topics:
➤How
do I set the run-time behavior?
➤How
do I watch my script running in real time?
➤Where
can I view information about the replay?
➤How
do I know if my test passed?
➤How
do I search in or filter the results?
How do I set the
run-time behavior?
LoadRunner Run-Time settings let you
emulate different kinds of real user
activity and behavior. For example,
you could emulate a user who responds
immediately to output from the server,
or a user who stops and thinks
before each response. You can also
configure run-time settings to specify
how many times the Vuser should repeat a set of actions
and how often.
The Log settings indicate how much
information to log while running the
test. During development, you may
choose to enable some logging for
debugging purposes, but once you
verify that your script is functional, you
can enable logging for errors only or
disable it.
Select Extended log and enable
Parameter substitution. This option will be
relevant for the following lesson at
which point it will discussed.
5 View the Think Time
settings.
Select the Think Time node.
Do not make any changes. You will set
the think-time from the Controller.
Keep in mind that when you run the
script in VuGen, it will run quickly
since it will not include think-time.
6 Click OK to close the
Run-Time Settings dialog box.
How do I watch my
script running in real time?
VuGen’srun-time viewer feature
displays the Vuser activities in real time as
you playback the recorded script.
By default, VuGen runs your test in
the background, without displaying an
animation of the actions in your
script. For this tutorial, however, you will
instructVuGen to display the actions
in a viewer that lets you see how
VuGen executes each step. The viewer
is not an actual browser—it only
displays snapshots of the pages that are returned to the
Vuser.
Where can I view
information about the replay?
When the script stops running, you can
view a summary of the replay in the
wizard. Clic
The Last Replay Summary, lists any
errors that may have been detected and
displays thumbnails of the Recording
and Replay snapshots. You can
compare snapshots and look for
discrepancies between your recording and
the replay.
You can also look at the Vuser’s
activity by reviewing a textual summary of
the events. VuGen’sReplay Log tab in
the Output window shows this colorcoded
information.
How do I know if my
test passed?
After you playback the events that you
recorded, you need to look at the
results and see if everything
succeeded. If something failed, you want to
know why and when it failed.
In this section you will view and
analyze the results of your script run.
VuGen summarizes the results of the
replay in the Test Results window.
To view test results:
1 Click Verify Replay
in the Task pane to return to the wizard.
2 Click the visual test
results hyperlink in the instruction pane under the
heading: “Verification”. Alternatively
choose View > Test Results. A new
results window opens.
When the Test Results window first
opens, it contains two panes: Tree pane
(on the left) and Summary pane (on the
right).
The Tree pane contains the results
tree. Each iteration is numbered. The
Summary pane contains the details of the
test.
The top table indicates which
iterations passed and which failed. The test is
considered to have passed when
VuGen’sVuser successfully navigates
through the HP Tours site according to
the original recording.
The bottom table indicates whether transactions
and checkpoints passed or
failed. You will add these features to
your test later on in the tutorial.
In the next section, you will drill
down into the test results to determine if
the script reached the intended Web
pages during replay.
How do I search in or
filter the results?
If your test results indicate that
something failed, you can drill down and
locate the point of failure.
In the Test Results window, you can
expand the test tree and view the results
of each step separately. The Test
Results window shows a snapshot of the
replay during that iteration.
1 Expand an iteration
branch.
Expand the branch Iteration 1 and then
expand the Action Summary
branch in the left pane by clicking
the plus sign. The expanded branch now
shows a list of the steps performed in that iteration.
No comments:
Post a Comment