[Performance test] loadrunner12.55 tutorial (1) - knowledge preparation

Table of contents

1.0. Preface

1.1 Introduction to Performance Testing Terminology

1.1.1 Response time

1.1.2 Number of concurrent users

1.1.3 Throughput

1.1.4 Throughput (Throughout)

1.1.5 TPS(Transaction Per Second)

1.1.6 QPS(Query Per Second)

1.1.7 Click rate (Hit Per Second)

1.1.8 Performance counter (Counter)

1.1.9 Think Time

1.1.10 Resource utilization

1.1.11 Transactions

1.1.12 Meeting point

1.1.13 Checkpoints

1.1.14 Average Response Time

1.2 Classification of performance tests

1.2.1 Performance test

1.2.2 Load Testing

1.2.3 Stress Testing

1.2.4 Configuration Testing

1.2.5 Concurrency Testing

1.2.6 Reliability Testing

1.2.7 Volume Testing

1.2.8 Benchmarking

1.2.9 Stability test

1.2.10 Recoverable testing

1.3 HTTP we need to know

1.1.1 The HTTP method requested by the client to the server

GET

POST

PUT

HEAD

DELETE:

OPTIONS

1.1.2 HTTP response status code

1.4 Loadrunner 12.55 installation

1.4.1 Installation tutorial

1.4.2 Introduction to Virtual User Generator

1.4.3 The core module in Loadrunner——Controller introduction

1.4.4 Introduction to Analysis

epilogue


1.0. Preface

In the performance test, many complicated knowledge points are involved. Here I will tell you some preparations that need to be made before the loadrunner performance test. In this section, we will start with some terms of performance test, and then go to HTTP. Some knowledge, and finally guide us to the environment configuration of loadrunner12.55.

1.1 Introduction to Performance Testing Terminology

1.1.1 Response time

​ Response time is the time it takes for users to experience the software system serving them

1.1.2 Number of concurrent users

​ Used to measure the concurrent capacity and synchronous coordination ability of the server. On the client side, it refers to a group of users performing an operation at the same time

C=nLT�=���

C^≈C+3C−−√�^≈�+3�

C is the average number of concurrent users; n is the number of login sessions; L is the average length of login sessions; T refers to the length of the time period under investigation;

C^�^

is the number of concurrent users;

(Actually, we basically don’t use this formula)

For example: the number of passengers an elevator can carry at the same time can be regarded as the number of concurrent users

1.1.3 Throughput

​ Throughput refers to the workload that the system can complete per unit of time. It measures the processing power of the software system server, which is to count the workload completed in one second. It refers to the total amount of data transmitted on the network during a performance test. ,

​ Usually the concept of throughput is not needed. Because it will have some misunderstandings in different people's minds.

​ It is extremely inaccurate to use throughput to measure the output capacity of a system. Using the simplest example, a faucet is turned on for a day and night, and 10 tons of water flow out; 10 faucets are turned on for 1 second, and 0.1 tons of water flow out. Of course the throughput of one tap is large. Can you say that the water output capacity of 1 faucet is stronger than that of 10 faucets? Therefore, we need to add the unit time to see who has the most water in 1 second. This is throughput.

​ For example, some people say that throughput is talking about TPS. Some people say that throughput is in bytes per second. Therefore, it is not recommended to use this concept to carry performance indicators, "TPS is enough" .

1.1.4 Throughput (Throughout)

​ Refers to the output (or service volume) provided by a business system per unit time.

1.1.5 TPS(Transaction Per Second)

​ Then let's take a look at TPS

​ TPS refers to transaction processing per second. The number of transactions or transactions that the system is able to process per second. It is an important indicator to measure the processing capacity of the system

​TPS  = concurrent number/average response time

TPS is calculated from the number of concurrency and the average response time. Can it be considered that TPS is the number of transactions processed in one second calculated by the number of concurrency and the average response time, and throughput is the number of transactions completed in one second.

For example: Bolt runs 10 meters in 1 second, it is calculated that he can run in one hour: 10*3600=36000m, in fact, Bolt ran for 10s, and the size of 36000m is what we calculated that if Bolt Walter can run 36000m in 3600s.
But in fact, let Bolt really run for an hour, and he may run for 20,000s (throughput), because he does not necessarily keep 10 meters in 1 second throughout the whole process, and he will be tired later, and he may run 7m in 1s
. That is, TPS emphasizes time, but throughput emphasizes time.

1.1.6 QPS(Query Per Second)

​ The number of queries per second, that is, the number of specified requests processed by the control server per second.

1.1.7 Click rate (Hit Per Second)

​ Refers to the number of HTTP requests sent per second. The greater the click-through rate, the greater the pressure on the server.

​CTR  can be seen as a specific case of TPS . The click-through rate can better reflect the pressure of the client on the server. TPS can better reflect the server's ability to process client requests.

​ The number of HTTP requests submitted by users to the web server per second. This indicator is a unique indicator of web applications; web applications are in the "request-response" mode. When a user sends an application, the server has to process it once, so a click is the smallest unit of transaction that a web application can handle. If each click is defined as a transaction, click-through rate and TPS are a concept. It is easy to see that the greater the click-through rate. The pressure on the server is also greater, and the click-through rate is only a performance reference indicator. It is important to analyze the impact of clicking.

​ It should be noted that the click here does not refer to a "click" operation of the mouse, because in a "click" operation, the client may find multiple HTTP requests to the server.

1.1.8 Performance counter (Counter)

​ Describe some data indicators of server or operating system performance

1.1.9 Think Time

Also known as "sleep time". Refers to the time interval between each request when the user is operating.

R=TTS�=���

R is the number of requests; T is time; Ts is thinking time;

1.1.10 Resource utilization

​ Refers to the degree to which different hardware resources are used in the server system, resource utilization = actual resource usage / total available resources

Common Resource Metrics

​ CPU usage: not higher than 75%-85%

​ Memory size usage: not higher than 80%

​ Disk IO (rate): not higher than 90%

​ Network (speed): not higher than 80%

1.1.11 Transactions

​ We mentioned affairs earlier, so here I will tell you about affairs by the way

​ A user-defined identifier used to measure the response time of the server or a set of tasks. The transaction time reflects the response time of an operation process.

​ The transaction processing process can be understood as: sending a request --> network transmission --> receiving a response

​ Pay attention to the response time of a business, which can be defined as a transaction

1.1.12 Meeting point

​ When simulating heavy user load on the system, configure multiple users to perform operations at the same time. When users arrive at the rendezvous point, they will wait until the specified number of virtual users arrive before performing user concurrent operations.

​ See the text to know that the collection point is the place where the collection is. For example, if we need to perform a stress test on the login, then we need users to gather at the collection point and perform login operations at the same time.

​ To simulate multiple users making requests at the same time, you can set the rendezvous point in the script.

1.1.13 Checkpoints

​ Generally used in conjunction with transactions, it is used to check script execution when compiling recording scripts and replay scripts, and to check specific text strings or pictures.

1.1.14 Average Response Time

​ The time required to process a transaction. The smaller the average response time and the smaller the average response time, the faster the processing speed and the better the efficiency of the software.

1.2 Classification of performance tests

1.2.1 Performance test

​ Performance testing is to test various performance indicators of the system by simulating various normal, peak and abnormal load conditions through automated testing tools.

1.2.2 Load Testing

​ Refers to the most common performance test for verifying general requirements, examining the performance of a software system under a given load

1.2.3 Stress Testing

​ Investigate the performance of the system under extreme conditions, extreme conditions can be overloaded transaction volume and the number of concurrent users

1.2.4 Configuration Testing

​ Refers to the adjustment of the software and hardware environment of the system under test to understand the degree of impact of various environments on system performance, so as to find the optimal allocation principle of various system resources.

1.2.5 Concurrency Testing

​ Refers to whether there are hidden concurrency issues when testing multiple users concurrently accessing the same application, module, and data, such as memory leaks, thread locks, and resource contention issues. Almost all performance tests involve concurrency testing.

1.2.6 Reliability Testing

​ Activities performed to assess the functional reliability of a product in all environments, such as intended use, transportation or storage, during a specified lifespan.

1.2.7 Volume Testing

​ The limit value of a certain index reflecting the application characteristics of the software system is pre-analyzed through the test, and the system does not have any software failure or maintains the normal operation of the main functions in its limit state.

1.2.8 Benchmarking

​ Refers to the quantitative and comparable testing of a certain performance index of a class of test objects through the design of scientific testing methods, testing tools and testing systems.

1.2.9 Stability test

​ Test whether there will be problems after the system runs under a certain load for a long time

1.2.10 Recoverable testing

​ Mainly check the fault tolerance of the system. When a system error occurs, can the error be corrected and the system restarted within a specified time interval.

1.3 HTTP we need to know

1.1.1 The HTTP method requested by the client to the server

GET

​ Get resources

POST

​ Transfer Entity Principal

PUT

​ Transfer files

​ Get the message header

DELETE:

​ delete file

OPTIONS

​ Ask the supported methods, the client is used to ask the server which methods are supported

1.1.2 HTTP response status code

status code meaning
100 Requesters should continue to make requests. The server returns this code to indicate that it has received the first part of the request and is waiting for the rest
200 The server has successfully processed the request
302 Rewrite to, will automatically forward the requester to a different location
400 The server did not understand the syntax of the request.
401 The request requires authentication. The server may return this response for web pages requested after login.
404 The server cannot find the page
500 internal server error
502 gateway error
504 gateway timeout

1.4 Loadrunner 12.55 installation

1.4.1 Installation tutorial

Installation package:
Download link:  Baidu network disk, please enter the extraction code
Extraction code: a3pi
Installation notes:

  • Before installation, turn off all anti-virus software and firewalls;
  • If LoadRunner has been installed before, it needs to be uninstalled;
  • Do not include Chinese characters in the installation path;
  • LoadRunner 12 no longer supports the XP system, and it is recommended to use IE10 or above as the browser. ; At the same time, children of win 11, please note that Loadrunner needs IE support

Start the installation package

Right-click the HPE LoadRunner 12.55 Community Edition.exe installer, select "Run as administrator", a pop-up window appears, select the file storage address, you can select the default path, and click "Install".

If the installation process is blocked by the anti-virus software installed on the computer, choose to allow the operation.

The installation wizard will verify whether the computer contains the necessary components for software installation and operation. If there are missing components, a pop-up window will display the components that need to be installed. Clicking the OK button will automatically install the required components, which must be installed before installing HPE LoadRunner.

After the prerequisite components are installed, the HPE LoadRunner installation wizard window will pop up, select the product to be installed, here select LoadRunner, and click "Next".

End User License Agreement, check "I accept the terms in the license agreement", and click "Next".

Target folder, select the installation path, the installation path cannot contain Chinese characters, click "Next".

HPE LoadRunner is ready to be installed, click "Install" to install the program.

HPE LoadRunner is being installed.

The LoadRunner installation is complete, click "Finish" to close the installation pop-up window.

After the installation is complete, there will be three softwares on our desktop, let’s introduce them one by one:

Order of use: Virtual User Generator -> Controller -> Analysis

1.4.2 Introduction to Virtual User Generator

​ The place where Virtual User Generator (user script) records and writes scripts is to simulate user behavior by recording or writing scripts, and at the same time print out log information for easy debugging of scripts; VuGen is also an integrated development and debugging environment, where scripts are completed After the development and debugging are passed, it can be placed in the Controller to create a scene.

​ To put it simply, we will use VuGen to record the process we need to test, and then perform some configuration and debugging on the recorded process.

1.4.3 The core module in Loadrunner——Controller introduction

​ Scenario is a technical method used to simulate a large number of user operations. By configuring and executing scenarios to generate load to the server, verify whether the performance indicators of the system meet user requirements, and Controller can help us design and execute scenarios and monitoring and management.

From a performance point of view, scenarios can generally be divided into two types:

  • Single scene: In one scene, there is only one script (business)
  • Theoretical cornerstone: In any system, if a single business is executed independently and the performance can pass, it means that each business itself can actually meet the performance requirements.
  • Mixed scenario: In one scenario, execute multiple scripts (business) at a time

Purpose: To test whether there is concurrency (generalized concurrency, that is, online or concurrent) conflicts between different businesses

Notice:

  • Number of load users: It has nothing to do with executing N scripts at a time, it should be the maximum number of load users (number of online users).
  • Load user distribution ratio: use statistical data (business volume ratio) to allocate virtual users.

LoadRunner uses the Controller component to design and execute scenarios. The scenarios in the Controller are divided into two types: target scenarios (basically not applicable), and manual scenarios.

1.4.4 Introduction to Analysis

​ is the place to generate chart reports after collecting test data, which helps us analyze the data and generate pictures, so as to facilitate the sorting and analysis of relevant data after load generation.

The above is the whole content of this section, if there is any mistake, please correct me!

epilogue

This post ends here, and finally, I hope that friends who read this post can gain something.

 Obtaining method: leave a message [software testing and learning]

If you think the article is not bad, please like, share, and leave a message , because this will be the strongest motivation for me to continue to output more high-quality articles!

Guess you like

Origin blog.csdn.net/weixin_67553250/article/details/131328542
Recommended