Performance testing tool LoadRunner - performance testing process and result analysis

Performance testing purpose

  1. 1What  is performance testing?

Performance testing uses performance testing tools to simulate a variety of normal, peak, and abnormal load conditions to test various performance indicators of the system.

Both load testing and stress testing are performance tests, and the two can be combined. Through load testing, the performance of the system under various workloads is determined. The goal is to test the changes in various performance indicators of the system when the load gradually increases. Stress testing is a test that determines the bottlenecks or unacceptable performance points of a system to obtain the maximum service level that the system can provide.

Performance testing classification and terminology

  1. 1Test  category
  • Load Testing:

Load testing refers to running one or more services under certain software, hardware and network environments, and testing whether the performance indicators of the server are within the range of user requirements under different numbers of virtual users, so as to determine the system requirements. The maximum number of users it can carry, the maximum number of effective users, as well as the system response time and server resource utilization under different numbers of users.

  • Stress Testing:

Stress testing refers to simulating a large number of virtual users to generate load on the server under a certain software, hardware and network environment. The server resources are at their limit and run continuously for a long time to test whether the server can work stably under high load conditions. . Unlike load testing to obtain peak performance data, stress testing emphasizes the stability of the system under extreme conditions, when processing power is no longer important.

  1. professional terms
  • Scenario:

The scenario is the test scenario. In the Controller component of LoadRunner, you can design and execute use case scenarios. The steps to set up the scenario mainly include: selecting the virtual user script in the Controller, setting the number of virtual users, configuring the behavior of the virtual users during runtime, and selecting the load generator (Load Generator). ), set execution time, etc.

  • Load Generator:

The machine used to generate pressure is controlled by the Controller, which allows user scripts to be executed on different hosts. In performance testing, one Controller usually controls multiple Load Generators to pressurize the system under test.

  • Virtual User/Vuser:

Corresponding to real users in reality, users simulated using LoadRunner are called virtual users. Performance testing simulating multiple user operations can be understood as: these virtual users are running scripts to simulate the behavior of multiple real users.

  • Vuser script:

Scripts recorded or developed via Vuser Generator. These scripts are used to simulate user behavior.

  • Transaction:

Testers can define one or more operation steps as a transaction, which can be generally understood as "a series of human-defined requests (the request can be one or more)". Programmatically, a transaction is represented by a block of code surrounded by a start mark and an end mark. Loadrunner calculates the transaction response time and the number of successful/failed transactions based on the start and end marks of the transaction.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

LoadRunner three major components

  1. Loadrunner installation

Loadrunner installation and cracking requires everyone to solve it by themselves, and searching can solve any problem!

  1. Loadrunner composition

  • VuGen (Virtual User Generator): used to record system performance test scripts or manually create and write performance test scripts.
  • Controller: used to organize, drive, manage and monitor load tests.
  • Analysis: Used to view, analyze, and compare performance results.
  1. 3Performance  testing workflow

[Develop test plan] => [Create test script] => [Design test scenario] => [Execute test scenario]

=>[Analyze test results] =>[System performance tuning]

  • Develop a test plan: Determine test requirements, such as the number of concurrent users, typical business scenario processes; test plan, etc.
  • Create Vuser scripts: Use Virtual User Generator to record and manually write test scripts.
  • Design test scenarios: Use LoadRunner Controller to set up test scenarios.
  • Execution scenarios: Use LoadRunner Controller to drive, manage and monitor the execution of scenarios.
  • Analyze test results: Use LoadRunner Analysis to generate reports and charts and evaluate performance.

Create test script

  1. 1Record  test script

Take the CRMEB Pro test as an example

  1. Test script debugging

  1. Script parameterization

  1. associated variables

For example: "token":"
1JYPO_yuDuqlSa5Gd9gnUBm4ShhmEKYSCohcnc6sNNw" to get the token value

  1. checkpoint settings

Set up the scenario to run the script

  1. 1Run  the test scenario

Controller console scene execution diagram, each part of the diagram is displayed:

Analyze test results

  1. 1Performance  indicators

TPS: Transaction per second refers to the number of transactions completed by the application system per second, which is an important basis for estimating the performance of the application system. Generally speaking, system performance is measured by the number of technical transactions completed per second. The overall processing capacity of the system depends on the TPS value of the module with the lowest processing capacity.

HPS: Hit per second refers to the total number of user clicks on web page links, submit buttons, etc. within one second. HPS is generally proportional to TPS and is one of the very important performance indicators in the B/S system.

Transaction response time: Transaction Response Time refers to the response time during the script test process from the beginning to the end of the script.

Resource utilization: Resource utilization refers to the usage of the CPU, memory, hard disk, external storage, and network bandwidth of the database server, application server, and web server during the load operation of the system.

  1. Result analysis

Obtain the relevant data of the results through execution scenarios: TPS, response time, CPU, IO, etc. According to the performance indicators mentioned in the performance test plan, confirm whether the results meet the requirements. If it does not meet the requirements, you need to find the performance bottleneck and optimize it.

  • Configuration item inspection: number of active middleware threads, JVM-related memory allocation, database connection pool, etc.
  • Hardware resources: Increase hardware resources such as CPU and memory (when resources are insufficient) and increase the number of servers
  • SQL statement and code analysis: By analyzing SQL and code, find out SQL or code with complex logic and low execution efficiency and modify it.
  • System architecture analysis: The risk is relatively high. (Typically performed by the architect)

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/IT_LanTian/article/details/132835071