Monday, 25 March 2013

How do I view the script | Loadrunner Tutorial pdf


How do I view the script

You have now recorded a travel agent logging in, booking a flight, and logging off. VuGen recorded your steps from the moment you clicked the Start Record button to the moment you clicked the Stop button.
You can now view the script inside VuGen. You can view the script in Tree view or Script view. Tree view is an icon-based view that lists the actions of the Vuser as steps, while Script view is a text-based view that lists the actions of the Vuser as functions.
Tree View
To view the script in Tree view choose View > Tree View or click the Tree view button. To view the Tree View across the whole window, remove the Task pane by clicking the Task button.

For each step you performed during recording, VuGen generated an icon and a title in the test tree. In Tree view, you see the actions of the user as script steps. Most steps are accompanied by a corresponding snapshot of the recording.
The snapshots make the scripts easier to understand, and easier to share between engineers because you can see exactly which screen was recorded during the recording process. You can compare the snapshots afterwards to verify your script’s accuracy. VuGen also creates snapshots of each step during replay.
Click the plus (+) sign adjacent to any of the steps in the test tree. You now see the Think Time that was recorded while you were booking a flight. Think Time represents the actual time you waited between steps, and can be used to emulate fast and slow user behavior under load. Think time is a mechanism whereby you can make your load test more accurately reflect a real user’s behavior.
Script View
Script view is a text-based view that lists the actions of the Vuser as API functions. To view the script in Script view choose View > Script View or click the Script View button.

In Script view, VuGen shows the script in an editor with color coded functions and their argument values. You can type C or LoadRunner API functions, as well as control flow statements, directly into this window.
Note: LoadRunner uses ANSI C. As your scripts become more advanced, you can leverage C to extend LoadRunner beyond record and playback.

No comments: