1 / 26

Enhancing - Vuser Scripts In HP LoadRunner

Learn how to insert transactions, rendezvous points, comments, and checkpoints in Vuser scripts to measure server performance in LoadRunner. Analyze performance using graphs and reports.

Download Presentation

Enhancing - Vuser Scripts In HP LoadRunner

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enhancing - Vuser Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  2. Enhancing Vuser Scripts Inserting Transactions Inserting Rendezvous Points Inserting Comments Using Checkpoints Regenerating a Vuser Script >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  3. Inserting Transactions Request  Response Request  Response Transactions Request  Response >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  4. Inserting Transactions Transactions are defined to measure the performance of the server. Each transaction measures the time it takes for the server to respond to specified Vuser requests. These requests can be simple tasks such as waiting for a response for a single query, or complex tasks, such as submitting several queries and generating a report. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  5. Inserting Transactions To measure a transaction, you insert Vuser functions to mark the beginning and the end of a task. Within a script, you can mark an unlimited number of transactions, each transaction with a different name. For LoadRunner, the Controller measures the time that it takes to perform each transaction. After the test run, you analyze the server’s performance per transaction using the Analysis’ graphs and reports. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  6. Inserting Transactions To mark the start of a transaction: While recording a Vuser script, click the Start Transaction button on the Recording toolbar. The Start Transaction dialog box opens. Type a transaction name in the Transaction Name box. Transaction names must begin with a letter or number and may contain letters or numbers. Click OK to accept the transaction name. VuGen inserts an lr_start_transaction statement into the Vuser script. For example, the following function indicates the start of the trans1 transaction: lr_start_transaction("trans1"); >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  7. Inserting Transactions To mark the end of a transaction: While recording a script, click the End Transaction button on the Recording toolbar. The End Transaction dialog box opens. Click the arrow for a list of open transactions. Select the transaction to close. Click OK to accept the transaction name. VuGen inserts an lr_end_transaction statement into the Vuser script. For example, the following function indicates the end of the trans1 transaction: lr_end_transaction("trans1", LR_AUTO) >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  8. Inserting Transactions Insert a transaction through wizard: Open the Transaction Creation wizard. Ensure that the Task Pane is displayed. If not click the Task button. In the Task Pane under Enhancements, click Transactions. The Transaction Creation wizard opens. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  9. Inserting Transactions The Transaction Creation wizard displays thumbnails of the different steps in your script. Click the New Transaction button. You are now able to drag the transaction markers and place them at their designated points in the script. The wizard prompts you to insert a starting point for the transaction. Using your mouse, position the transaction opening bracket before the starting transactions and place the closing bracket after the transaction has ended. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  10. Inserting Transactions Insert the following transactions in the script: logon search_flight book_flight check_itinerary logoff >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  11. Inserting Transactions >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  12. Inserting Rendezvous Points When performing load testing, you need to emulate heavy user load on your system. To accomplish this, you synchronize Vusers to perform a task at exactly the same moment. You configure multiple Vusers to act simultaneously by creating a rendezvous point. When a Vuser arrives at the rendezvous point, it waits until all Vusers participating in the rendezvous arrive. When the designated number of Vusers arrive, the Vusers are released. You designate the meeting place by inserting a rendezvous point into your Vuser script. When a Vuser executes a script and encounters the rendezvous point, script execution is paused and the Vuser waits for permission from the Controller to continue. After the Vuser is released from the rendezvous, it performs the next task in the script. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  13. Inserting Rendezvous Points While recording a Vuser script, click the Rendezvous button on the Recording toolbar. The Rendezvous dialog box opens. Type a name for the rendezvous point in the Rendezvous Name box. Click OK. VuGen inserts lr_rendezvous into the Vuser script. For example, the following function defines a rendezvous point named rendezvous1: lr_rendezvous("rendezvous1"); To insert rendezvous points into your script after the recording session, select Insert > Rendezvous from the VuGen menu. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  14. Inserting Comments Comments are non-executing text strings in program code (also known as remarks). Comments can be used to document code or temporarily disable parts of statements. Using comments to document code makes future program code maintenance easier. Comments are often used to record the program name, the author name, and the dates of major code changes. Comments can be used to describe complicated calculations or explain a programming method. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  15. Inserting Comments VuGen allows you to insert comments between Vuser activities. You can insert a comment to describe an activity or to provide information about a specific operation. For example, if you are recording database actions, you could insert a comment to mark the first query, such as "This is the first query." >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  16. Inserting Comments To insert a comment: While recording a script, click the Comment button on the Recording tool bar. Type the comment into the text box and click OK to insert the comment and close the dialog box. The text is placed at the current point in the script, enclosed by comment markers. The following script segment shows how a comment appears in a Vuser script: /* * This is the first query */ >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  17. Using Checkpoints A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add two types of checkpoints to your test for standard web objects using LoadRunner. Text Checkpoint - checks that a text string appears on a Web page. Image Checkpoint - checks for an image on a Web page. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  18. Using Checkpoints - Text Right Click >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  19. Using Checkpoints - Image View the image property and value >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  20. Using Checkpoints - Image >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  21. Using Checkpoints - Image >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  22. Regenerating a Vuser Script If you need to revert back to your originally recorded script, you can regenerate it. This feature is ideal for debugging, or fixing a corrupted script. When you regenerate a script, it removes all of the manually added enhancements to the recorded actions. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  23. Regenerating a Vuser Script If you added parameters to your script, VuGen restores the original values. The parameter list, however, is not deleted; you can reinsert parameters that you created earlier. Options: When working with multi-protocol scripts, you can indicate which protocols to regenerate. To customize the regeneration, click the Options button in the Regenerate Vuser dialog box to open the recording options. Select the Protocols tab and indicate which protocols to regenerate and which to leave as is. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  24. Regenerating a Vuser Script Select Tools > Regenerate Script. VuGen issues a warning indicating that all manual changes will be overwritten. OK: Regenerates the Vuser script from the original Recording log. Regeneration removes all correlation's and parameterizations that you performed on the script manually. >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  25. Insert following transactions into the parameterized script: logon, search_flight, book_flight, check_itinerary, logoff through Tree view. Regenerate the script to remove all transactions and parameters. Insert the same transactions again through Script view. Insert Rendezvous points before every transaction. Refine the script by adding appropriate comments. Insert Text checkpoints and view the results with “Enable Image and Text Check” preference selected. Insert Image checkpoints and view the results with “Enable Image and Text Check” preference selected. Questions - To Review Your Skills >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

  26. Thank You >>>>>>>>>>>>>>>>>>>>>> www.softwaretestinggenius.com <<<<<<<<<<<<<<<<<<<<<<

More Related