LR Transactions (transaction)

Source: Internet
Author: User

This article comes from: Yu Yong's "performance Test and LoadRunner practice"

Transaction: A transaction is a task or set of actions to measure the response time of its servers. A complete transaction is comprised of the start of a transaction, the end of a transaction, and one or more business operations/tasks. The form is as shown in Figure 1-5:

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml"/><?xml:namespace prefix = o ns = "Urn:schemas-mi" Crosoft-com:office:office "/>

Figure 1-5 (a transaction sample code snippet)

There are two ways to insert a transaction, one is manual, and the other is to add a transaction using a menu or toolbar. By hand, scripting people must be very clear about the contents of the script, inserting the start of the transaction and the end function of the transaction at the right place. Alternatively, applying a menu or sidebar to add a relatively simple way to do this, first switch to the script tree view, see Figure 1-6, and then add the transaction start and transaction end through the menu or toolbar, see figure 1-7.

Figure 1-6 (Toolbar related buttons)

Figure 1-7 (Transaction-related menu options and Tool buttons)

"Author Tips"

 

1. A transaction must be a pair appearance, namely: a transaction has a transaction beginning inevitably requires the end of a transaction.

2. The transaction End function consists of two parameters, the first parameter is the name of the transaction, and the second is the state of the transaction. The transaction state can be lr_pass: Returns the "succeed" return code; Lr_fail: Returns the "FAIL" return code; Lr_stop: Returns a "STOP" return code; Lr_auto: Automatically returns the detected state.

In the process of applying a transaction, do not place the thinking time (Lr_think_time function) between the start of the transaction and the end of the transaction, otherwise, when the playback thinking time setting is allowed, the thinking time is counted into the execution time of the transaction, thus affecting the analysis and statistics of the correct execution time of the transaction.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.