Recognize LoadRunner and related performance parameters

Source: Internet
Author: User
Tags random seed

Recognize LoadRunner and related performance parameters

   LoadRunner, is a load that predicts the behavior and performance of the system TestTools. LoadRunner is able to test the entire enterprise architecture by identifying and locating problems in a way that simulates the concurrent load and real-time performance monitoring of tens of thousands of users. By using LoadRunner, businesses can minimize test time, optimize performance, and accelerate the release cycle of application systems. LoadRunner is an automated load testing tool for a variety of architectures that can predict system behavior and optimize system performance. ObjectLoadRunner's Test object is the enterprise-wide system that helps you find and discover problems faster by simulating actual user behavior and implementing real-time performance monitoring. In addition, LoadRunner can support a wide range of protocols and technologies to provide special solutions for your particular environment. Key Features easily create virtual usersWith LoadRunner's virtual User Generator, you can easily create a system load. The engine can LoadRunner Performance Virtual user simulation testVirtual users to simulate the business operation behavior of real users in the same way as virtual users. It records the business process (order or ticket booking below) and translates it into a test script. With virtual users, you can Windows, UNIX or LinuxIt also generates thousands of user accesses on the machine.  So loadrunner can greatly reduce the hardware and human resources required for load testing. Once you have created a test script with virtual User Generator, you can parameterize it, which allows you to test your application with several sets of actual data, reflecting the load capacity of the system. As an example of an order entry process, a parameterized operation can replace fixed data in a record, such as an order number and a customer name, by a variable value.  Randomly enter the possible order number and customer name within these variables to match the action behavior of multiple real users. To further determine that your virtual user can simulate real users, you can use LoadRunner to control certain behavioral features. For example, with just a click of a mouse, you can easily control the number of trades, the frequency of transactions, the user's thinking time and connection speed. Create a real loadWhen Virtual users is established, you need to set up your load scheme, business process mix, and number of virtual users. With LoadRunner controller, you can quickly organize a multi-user test plan.  The Controller's Rendezvous feature provides an interactive environment in which you can build continuous and cyclic loads while managing and driving load test scenarios. Furthermore, you can use its scheduling service to define when a user accesses the system to generate a load. This enables you to automate the testing process. You can also use a controller to qualify your load scheme in which all users perform an action at the same time---such as logging into an inventory application----to simulate peak load situations. In addition, you can monitor the performance of individual components in the system architecture----including servers, Database, network equipment and other----to help customers determine the configuration of the system. Positioning Performance IssuesThe LoadRunner includes an integrated real-time monitor that allows you to observe the operational performance of your application at any time during the load test process. These performance monitors give you real-time display of trading performance data (e.g. response time) and other system components including application Server, WebReal-time performance of servers, network devices, and databases.  In this way, you can evaluate the performance of these system components from both client and server aspects during the testing process to find problems faster. With LoadRunner's Contentcheck TM, you can determine whether the application under load is functioning properly or not. Contentcheck detects the contents of the application's network packet while the virtual users are running, and determines whether any error content is sent out. Its real-time browser helps you observe the performance of your program from an end-user perspective. analyze the results to pinpoint where the problem liesOnce the test is complete, LoadRunner collects and summarizes all of the test data and provides advanced analysis and reporting tools to quickly find performance issues and trace them back to the original. With LoadRunner's web Transaction detail monitor, you can see how long it takes to download all the images, frames, and text to each page. For example, the transaction detail analysis mechanism can analyze whether the application system is slowing down because of a large-size graphics file or a third-party data component. In addition, the WEB Transaction Detail monitor is decomposed for client, network, and server response times at the top-to-end, making it easy to identify problems and locate components that are really faulty. For example, you can decompose the network latency to determine the time it takes for the DNS resolution time to connect to the server or SSL authentication. By using the LoadRunner analysis tool, you can quickly find the location and cause of the error and make the appropriate adjustments. Repeat testing ensures high performance of system releasesA load test is a repeating process. Each time an error is processed, you need to perform a load test on your application under the same scenario.  This verifies that your modifications have improved operational performance. LoadRunner fully supports load testing of EJBS. These Java-based components run on the application server and offer a wide range of application services.  By testing these components, you can identify and resolve potential problems early in the development of your application. With LoadRunner, you can easily understand the performance of your system. Its controller allows you to repeatedly execute the same test scenario as before the error modification. Its HTML-based report provides you with a baseline for comparing performance results to measure how much improvement has been made over time and to ensure the success of your application.  Because these reports are HTML-based text, you can publish them on your company's intranet for easy access. The next article will be the editor of an online use of loadrunner® to test the BEA middleware product article to share with you how to use LoadRunner for actual performance testing. Performance Testing 1. Virtual users of LoadRunnerLoadRunner uses virtual users to simulate actual user pressure on the business system.  The virtual user works under the supervision of a central controller (the controller station). The first thing to do when doing a test scenario is to create a virtual user execution script. LoadRunner provides the virtual user generator to record or edit the dummy users script. 2. Create a virtual user execution script using VugenA Select Run Virtual User generator:b from the menu. Create a single protocol script and select the protocol type "Tuxedo 7" C.  Enter the executable file name (SimpApp.exe) of the Tuxedo client program in the pop-up window and select "Record into action" as action. Click "OK" to start recording the script, then Vugen will start Simpapp.exe, as shown, enter WSNADDR, input string (Tuxedo is powerful!), click ToUpper, TUXEDO the output string after the server completes the request (TUXEDO is powerful!  ), write to "Output string" and click the Stop Recording button. D Edit the VUser script.  All operations done in C are recorded and recorded in a script file with the following contents, which are saved as Simpapp. The script reads as follows:
#include "lrt.h" #include "REPLAY.VDF" Actions () {lrt_tuxputenv ("wsnaddr=//172.22.32.25:7110"); Lr_think_time (3); Tpresult_int = Lrt_tpinitialize (lrt_end_of_parms); Lrt_abort_on_error ();d ata_0 = Lrt_tpalloc ("STRING", "", 1); Lrt_ strcpy (Data_0, sbuf_1);d ata_1 = Lrt_tpalloc ("STRING", "", 1); tpresult_int = Lrt_tpcall ("TOUPPER", Data_0, 0, &data_1 , &olen, 0); Lrt_abort_on_error (); Lrt_tpfree (DATA_0); Lrt_tpfree (data_1); Lrt_tpterm (); return 0;}
The bold function in the code is the LoadRunner to the tuxedo function two times. E.  Click on the "Execute" button in the toolbar to execute the script we just recorded and make sure it's done correctly. 3. Use the Controller to dispatch virtual user A. Select Run Controller:b from the menu. To create a new scenario, select the script you just recorded (Simpapp): Click "OK" to eject the scenario scheduling interface. Enter 100 in "Quantity" to indicate the use of 100 virtual users. (The virtual user is associated with the purchased license) C.  Click "Edit Schedule" to edit the pressure dispatch. D  Select "Runtime Settings" to make the runtime settings.  In the pacing setting, "Number of iterations" is used to set how many times the actions of the vusers are executed; "Start new Iteration" sets the time at which the scheduler performs vusers actions. "Think time" is used to set vusers reaction and think times to try to do as much pressure as normal. "Ignore think time" means ignoring think times, which is an ideal state that is generally not used. "As recorded" indicates the actual operating time as recorded.  "Multiply recorded think time by" means that vusers think times are several times the actual recording time. Set some miscellaneous in "miscellaneous", such as using a process or using threads.  For tuxedo, it seems that only process mode is selected. E. Select "Start Scenario" to start the stress test schedule. The execution results are analyzed as follows:The pressure time is 5 minutes 41 seconds, the number of vusers is 100, the total number of actions completed is 5625, the average response time is 5.561 seconds, TPS is 17.8. [1] LoadRunner Components1. Vugen (Virtual user builder) is used to capture end-user business processes and create automated performance test scripts (also known as Virtual user scripts).  2 controller is used to organize, drive, manage and monitor load tests.  3. Load Generator (payload generator) is used to generate load by running virtual users. 4. Analysis (analyzer) helps you view, analyze, and compare performance results. Instance ApplicationIn the Software Testing tool, how to skillfully use the random function of LoadRunner LoadRunner has its own random function, if skillfully adopted, can solve some seemingly difficult practical problems. A performance test for a project. Directly connected to the database, the SQL templates are read from the specified database, assembled into real SQL statements, executed, and the resulting results put into the cache, based on the external incoming SQL ID and SQL parameters.  The goal is to reduce the pressure on the database.  The system will support a large number of SQL operations, performance naturally become one of the focus of attention. Because it is related to SQL statements, in real-world situations, different types of SQL may be executed at the same time, with various parameters, even for the same type.  So, how can we simulate the most realistic performance test scenarios?  The first design scenario, that is, in LoadRunner random to a certain type of SQL, and then randomly passed the parameters to it, so that the final SQL is randomly generated, each is different. From the scene, you can see that this involves double randomization. Parameter settings that use only Loadruner are not possible.  At this point you need to find a way to randomly fetch the SQL at a set rate, and then randomly take the parameters in the argument list on each SQL. So I thought of the random function of LoadRunner.  Implement a random SQL ID, and then randomly take parameters from a parameter list in a specific SQL. In LoadRunner, the random function is rand (), which is used to produce a random integer between 0 and Rand_max.  The function prototype is int rand (void); Before calling Rand, however, a random seed must be generated for the random number. This seed is produced by the Srand () function.  Its prototype is int srand (seedtime); With the above two functions, we can achieve the first heavy random. The specific script code is as follows:
Generate rand Numberint rnum = 0;srand (Time (NULL)), rnum = rand ()% 10;lr_output_message ("The number is:%d", rnum); Print the current random number
After generating a random number, then proportionally with the If ... else ... To fetch the various types of SQL and pass them to them. The specific script code is as follows:
Get certain SQL and random Valueif (rnum>=0 && rnum<2) {web_url ("test", "url=http://host_name:8080/ INTERFACE?SQLID=SQLID_NAME2&VALUE={RANDOM_PARA2} "," Resource=0″, "reccontenttype=text/html", "Referer=", " Snapshot=tn.inf "," Mode=http ", last);} ... else if (rnum>=8 && rnum<10) {web_url ("test", "url=http://host_name:8080/interface?sqlid=sqlid_name2 &VALUE={RANDOM_PARA2} "," Resource=0″, "reccontenttype=text/html", "referer=", "Snapshot=tn.inf", "Mode=HTTP", last);} else {rnum = 0;lr_output_message ("The number is:%d", rnum);}
Note: Sqlid_name is the SQL ID name; Random_para is a random parameter implemented by file mode; TN is the snapshot name of the Web_url function. Through the above script, implemented the performance test design scenario. After the debugging is passed, the controller is put into execution. During the actual execution, VUser will randomly fetch the different types of SQL and randomly fetch the parameters in SQL to execute the specific SQL statement.

Recognize LoadRunner and related performance parameters

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.