Building Scripts For HP Load Runner www softwaretestinggenius
Building Scripts For HP Load. Runner >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Building Scripts ü ü ü Introducing the Virtual User Generator (Vu. Gen) The Vu. Gen Window at a Glance Developing a Vuser Script Example- HP Web. Tours Website Tree View and Script View >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Introducing the Virtual User Generator (Vu. Gen) Ø HP’s tool for creating Vuser scripts is the Virtual User Generator, Vu. Gen. Ø During recording Vu. Gen monitors the client end of the database and traces all the requests sent by the user and received from the user, to the server. Ø During playback, Vuser scripts communicate directly with the server by executing calls to the server API. Ø When a Vuser communicates directly with a server, system resources are not required for the client interface. This allows a large number of Vusers to run simultaneously on a single workstation, and few testing machines are required to emulate large server loads. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
The Vu. Gen Window at a Glance >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Developing a Vuser script >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Recording Options Ø HTML based: Records script for every user action that is performed during recording Ø URL based: Records each and every browser request to the server and resources received from the server. Ø HTML mode is recommended for browser applications while URL mode is recommended for non-browser applications. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Start Recording Ø Application Type: ü Internet Application type for web based applications e. g. Web/Oracle NCA. ü Win 32 Application type for non-Internet Applications e. g. Windows Socket. Ø Program to record: Select the browser or Internet application to record. Ø URL Address: Specify the application URL address. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Start Recording Script consists of 3 sections… Ø Vuser_init( ): Login to server Ø Actions: Clients activities Ø Vuser_end( ): Logoff >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
User Actions Logon (recording optional) vuser_init. c User Actions (Business Processes) Action 1. c, Action 2. c, etc. (e. g. , Create Order, Ship Order) Logoff (recording optional) vuser_end. c This section may be iterated (repeated) during one test run >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Recording Script Ø Provide the URL of the application and navigate through the scenario that is to be tested. Ø The script is automatically recorded in Vu. Gen. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Open the Start Recording dialog box. Ø In the URL address box, type http: //localhost: 1080/Web. Tours. Ø In the Record into Action box, select Action. Ø Click OK. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Log on to the HP Web Tours Website. Ø For the User Name enter “jojo” and for the Password enter “bean”. Click Login. Ø A welcome page opens. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Click Flights and provide the following information: Ø Departure City: Denver (default) Ø Departure Date: Keep the default, current date Ø Arrival City: Los Angeles Ø Return Date: Keep the default, tomorrow’s date Ø Seating Preference: Aisle Ø Keep the rest of the default settings and click Continue. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø The Search Results page opens. Ø Select a flight: Ø Click Continue to accept the default flight selections. The Payment Details page opens. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Enter payment information and book flight: Ø Enter 12345678 in the Credit Card box and type 06/10 in the Exp Date box. Ø Click Continue. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø The Invoice page opens, displaying your invoice. Ø Check the itinerary: Ø Click Itinerary in the left pane. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Ø Ø The Itinerary page opens. Click Sign Off in the left pane. Click Stop on the floating toolbar to stop the recording process. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Example- HP Web Tours Website Ø Ø The Code Generation pop up window opens while the Vuser script is generated and recording summary is displayed. The recording summary includes the protocol information and a list of the actions created during the session. For each step you performed during recording, Vu. Gen generated a snapshot, a picture of the window during recording. Select File > Save or click the Save button. Type basic_tutorial in the File name box and click Save. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Viewing the script – 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 select View > Script View or click the Script View button. In Script view, Vu. Gen shows the script in an editor with color coded functions and their argument values. You can type C or Load. Runner API functions, as well as control flow statements, directly into this window. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Questions - To Review Your Skills Ø Ø Create script for HP Web. Tours application using HTML based recording mode. Create script for HP Web. Tours application using URL based recording modes. How does Protocol Advisor works? Analyze Web. Tours application using Protocol advisor? Create script for HP Web. Tours application using different actions for login, transactions and logout. >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
Thank You >>>>>>>>>>> www. softwaretestinggenius. com <<<<<<<<<<<
- Slides: 21