Newbies on the road: taking stock of the technical points that must be mastered in "performance testing"

Newbies on the road: taking stock of the technical points that must be mastered in "performance testing"

Some time ago, some friends asked us to push some technical information on performance testing. Therefore, the editor today summarized some content about performance testing by searching for information on the Internet and combining it with some problems during the actual operation of the project. I hope it is what everyone wants to know.

1. Purpose of performance testing

First of all, let’s clarify a question: why do we perform performance testing on products/software?

Nowadays, the vast majority of software products on the market are distributed applications. This leads to some interesting phenomena: the products developed may not have problems when used by a small number of users, but once the number of users increases, they are prone to system crashes and other problems.

So why does this happen? This is caused by the number of users and the uncertainty of user scenarios. When the number of concurrent users exceeds the load, the system will collapse. It can be seen that it is very important to perform performance testing on newly developed products. It can help us understand the number of concurrent users that the system can sustain, bandwidth, cpu, memory, hard disk speed, etc.

2. Contents of performance testing

Performance testing mainly includes the following aspects: load testing, stress testing, capacity testing, etc.

Load test: It does not limit the running resources of the software and tests the upper limit of the data throughput of the software to discover design errors or verify the load capacity of the system. The goal is to determine and ensure that the system will function properly when the maximum expected workload is exceeded.

Stress Test: Also called a strength test. By simulating the actual application software and hardware environment and the system load of the user's use process, the performance, reliability, stability, etc. of the system under test can be tested by running for a long time or with a large load.

Capacity test: It can be regarded as a specific performance indicator under a specific environment among system performance indicators, that is, a set limit or limit value.

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

3. Performance test evaluation indicators

Having said so much, let’s evaluate the performance test indicators below.

From a user's perspective, if the response time is generally <2 seconds, it is considered a smooth experience; if the response time is >10 seconds, you should consider improving the response speed;

In terms of product throughput, we need to pay attention to hard disk IO (read and write), network IO (upstream and downstream bandwidth), cupIO, server processing capabilities, the number of open pages on the client, etc.

In addition, we also need to understand the transaction processing capabilities of a user's actions such as opening a page, logging in to the server, and sending a message.

4. Performance testing concerns

  • l Response time, server-side processing speed
  • l Server-side usage
  • l Resource usage on the database side
  • l Maximum number of user visits
  • l The maximum number of services processed simultaneously
  • l Examine whether the system can support 24/7 operation
  • l Can memory resources and thread resources be recycled normally?
  • l Whether the code, algorithm, and SQL statement design are reasonable?
  • l Stability and recoverability of the entire system

5. Core principles of performance testing

1) Based on protocol (communication mechanism between front-end and back-end), based on interface (interaction with front-end), based on code (back-end);

2) Network-based distributed architecture: based on network protocols to simulate users sending requests, etc.;

3) Based on multi-threading: simulate multi-thread operation, multiple people operate at the same time, simulate large load;

4) Based on real scenarios: Simulate the real network environment, the user operation time is uncertain, the operation is uncertain, and the accuracy of the obtained data also varies. If the scenario is wrong, the data may not be available.

6. Code implementation performance testing

For performance testing of a certain function, you can log in to the forum and post (post protocol, multi-threading), login operations, post operations (involving protocols), etc., and use multi-threaded operations at the same time.

7. Use of Loadrunner

The four components of Loadrunner are:

  • Vuser generator: develop performance test scripts;
  • Controller: Provides multi-threaded concurrency and other operations;
  • Analysis: result analysis;
  • Load generator: load generator (a primary key in the controller)

Let me introduce it to you in detail below.

In the vuser generator (virtual user generator), create a new script:

Enter the interface and click start to record a script;

Internet application refers to the b-s architecture, and win 32 refers to the c-s architecture. The default is to record to action. Checking "recond" means starting immediately.

Can be written by hand and recorded. Click web_url, use get request; click web_submit_data, use post request.

If garbled characters appear, you can solve it like this:

At the beginning: tool > advaced > support charset // utf-8 or native encoding

Runtime: vuser > preferences > option > convert from/to utf-8

Finally, there is the difference in encoding. You can refer to it:

National standard GB-x, 2byte-16bit, 2^16 combinations, only encoding Chinese.

utf-8: 3byte = 24bit 2^24 combinations, uniformly encoding text around the world.

ascii code: one byte (2^8=128)

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/134929274