Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the skills of using LoadRunner

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what are the skills for the use of LoadRunner". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the skills for using LoadRunner".

I. performance indicators

Before doing the performance test, let's briefly talk about the performance metrics:

Response time

For page operations, if the response time is less than 2 seconds, the user will feel that the system is faster and more satisfied; if the response time is 2-5 seconds, the user can accept it, but he is not satisfied with the speed; if the response time is more than 5 seconds, the user will not accept it.

As an excellent project, the sooner the better. When we do stress testing, we generally hope that the response time is less than 1 second, and the response time of the interface called within the system is faster, depending on the specific interface.

Throughput

It usually depends on the market objectives of the business unit.

Server resource usage

CPU utilization and memory utilization should not be too high, and Cache hit rate should not be too low.

Second, performance testing process

Set performance test goals-- > Select performance test tools-- > Design performance testing-- > execute performance test scripts-- > Monitoring and analysis system-- > performance tuning

1. Goal:

For example, when the system needs to satisfy 500 users online and 20 users to post concurrently, the response time of the post is no more than 2 seconds, and the utilization rate of system resources is less than 30%.

2. Select a performance testing tool:

You can choose mainstream testing tools such as LR, Locust, jmeter, and so on. LR is mainly introduced below.

3. Performance test preparation:

Test script development, load generation rules and monitoring methods, test environment construction.

Points to pay attention to in the preparation of performance tests:

Confirm that SQL Review has passed before pressure test.

Confirm that the stress test environment has been successfully built, and a set of program code is deployed separately on the stress test server.

Specify the domain name and the host to be bound

Find out the business and scenarios that require stress testing (can also be understood as test cases)

Clear input parameters and server return information

Specify the input value that needs to be parameterized, and specify the "request successful server return code".

4. The load process and the analysis of the data after the load, this analysis requires the cooperation of many experts to find out the problems behind the data and determine the performance bottleneck.

5. After the bottleneck is determined, the software and hardware are tuned, and the tuning completes the previous steps.

III. Main features of Loadunner

Excellent performance testing tool

Easy to use

3. Excellent stress test performance, easy to find performance bottlenecks (such as detection: thread exception, memory exception, connection pool exception, object leakage, database and application system performance)

A few bright spots:

1. Transactions: for transaction timing

two。 Rendezvous point: set the rendezvous point before the concurrent user sends the request, and then issue the concurrent request after all the concurrent users arrive at the rendezvous point.

3. IP spoofing: simulates different IP addresses to send business requests to the application system

4. Parameterization: after parameterization, the script data is transformed into thousands of different scripts that request data to ensure uniqueness.

5. Multiple scenario types: with the same script, you can set different scenario types to issue business requests to the application system

6. Multi-machine: the load is generated by the combination of multiple computers to ensure the stability of the client

7. Monitoring: support for monitoring server resources

8. Performance analysis: chart and table analysis of test results, very intuitive

IV. Frequently asked questions on LoadRunner

1. Solution if the LR script is empty

① removes the third-party support in ie settings and cancels it

② adds the vugen.exe file in the loadrunner installation directory in system Properties-Advanced-performance-data execution Protection.

The possible solution to encounter an empty flight interface:

① cannot generate a recording script if a browser other than IE is installed and IE is not the default browser

② if IE cannot be opened when recording a script, you need to uncheck "enable third-party browser extension" from the browser's IE tools Advanced options.

③ lr comes with webtours system, if you click the Flights option and a blank page appears, please check the PERL5LIB environment variable of the native oracle. My solution is to delete the content of the variable when using webtours and fill in the content of the variable when using oracle. The reason is unknown why this variable will affect the use of webtours.

2. Why doesn't the IE browser pop up when LoadRunner records the script?

When multiple browsers are installed on a host, LoadRunner recording scripts often encounter situations in which the browser cannot be opened, which can be solved in the following ways.

Launch the browser, open the Internet options dialog box, switch to the advanced tab, uncheck "enable third-party browser extensions (need to restart)", and then run VuGen again to solve the problem.

Tip: usually after installing browsers such as Firefox, you will check the above options, resulting in non-normal recording. Therefore, it is recommended to maintain a clean test environment on the host running LoadRunner.

3. What's the difference between HTML-based script and URL-based script scripts?

The script is recorded in "HTML-based script" mode, and VuGen generates separate steps for each HTML operation of the user, which looks intuitive; when recording the script in "URL-based script" mode, VuGen can capture all HTTP requests sent to the server as a result of the user's action, and then generate a corresponding method for each request of the user.

Usually, browser-based Web applications use "HTML-based script" mode to record scripts, while there are no browser-based Web applications, Web applications include Java Applet to interact with the server, browser-based applications contain JavaScript/VBScript code to communicate with the server, and browser-based applications use HTTPS security protocol to record.

4. What is the main impact of runtime Pacing settings?

Pacing is mainly used to set the interval between iterating scripts. There are three methods: start immediately after the end of the last iteration, wait for a fixed time after the end of the last iteration, and start a new iteration at fixed or random intervals.

You can set iterations according to your actual needs. Usually, there is no time interval will lead to more stress.

5. In the runtime setting Log tag, if "Enable logging" is not checked, can manual messages be sent?

The Enable logging option affects only automatic logging and messages sent over lr_log_message. Even if it is not checked, if lr_message, lr_output_message, lr_error_message are used in the virtual user script, the messages they send will still be recorded.

6. When LoadRunner plays back the script, the Chinese displayed in the browser is garbled.

Solution (1):

First set Run-Time Settings-Browser-Browser Emulation-User-Agent

Then set the IE:

View-encode-hook "Auto Select" and Unicode (UTF-8).

Solution (2):

Use the lr_convert_string_encoding function to convert the encoding.

Thank you for your reading, these are the contents of "what are the skills for the use of LoadRunner?" after the study of this article, I believe you have a deeper understanding of what skills you have in the use of LoadRunner, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report