当前位置:网站首页>How to write a performance test plan
How to write a performance test plan
2022-07-01 22:36:00 【Software testing Lao Mo】
Catalog
Two . Performance test requirements
6、 ... and . The test strategy
7、 ... and . Manpower and time arrangement
One . brief introduction
There is no need to describe too much in the introduction , Nothing but the background of the project , The reason for this performance test , And the scope of performance test coverage, etc , Almost all project documents begin with a brief description of the project .
Two . Performance test requirements
Look for the tested object and pressure point
The object to be tested is not imagined out of thin air , But through analysis and systematic data collection . Take down several typical pressure points
Sign in : For general systems , Login is the premise of user operating system , If the user can't log in at all , Then other functions will be useless . For example, online games , When opening a new suit , Players broke their heads just to log in .
Inquire about : Query generally consumes system and database resources . The query function of search engine is typical , If you enter something in the input box , There will be no results for a long time . I want to be called “ Internet access ” Search engines will not exist .
transaction : For some e-commerce systems , The performance requirements of the transaction process are very high , If the transaction process takes users a long time . I'd rather go shopping in the supermarket . Of course , In addition to the speed of trading , The requirement for the success rate of the transaction is also very high . Otherwise , The damage is also immeasurable .
The system under test should be the most important and basic function , It is also the most frequently used function by users .

General performance requirements include :
System capacity : How many users can the system accommodate to register .
Number of visits : Number of users accessing the system at the same time .
Concurrency number : The number of concurrent operations performed simultaneously , There should be a combination of concurrent numbers of different operations in a system ( Generally, users with permission to operate ).
The maximum number of users and the best number of users of the system : The maximum number of concurrent users the system is bearing , The concurrent user data that the system bears in the best state .
response time : The time interval between the user submitting an operation and getting a response .
Throughput rate : The system processes every second TPS
A key factor in performance testing is stress , Performance is the performance under the maximum pressure that the system design meets . The concurrency number should not be less than the peak value of the normal operation of the system , The total amount of data is not less than the normal operation of the system 3 Monthly data volume .
When describing the number of concurrent users , There will always be corresponding time limit . In essence, the performance index of the system should be described by the number of requests processed by the system in unit time and the request response time . The number of requests that can be processed per unit time is the business throughput of the system . The number of virtual concurrent users can be converted using the following formula : ( Number of real users × Number of requests per real user )/( Total request response time + Real users always think about time )=( Number of virtual users × Number of requests per user )/( Total request response time + Virtual users always think about time )= throughput .
3、 ... and . Test environment
The test environment here mainly refers to the software and hardware environment and network environment .
The author believes that the performance test is best carried out in an independent environment , In this way, it will not be disturbed by the outside world , The test data is independent and valid . If you now stress test a website that is already online , So the data you get is not independent , Because when you're doing a stress test , Other retail investors are also accessing the system .
Software environment :
The software environment here mainly refers to the environment in which the project runs , For example, what kind of operating system 、 middleware 、 And the database .
Hardware environment :
The hardware environment here mainly includes the internal components of the host ,cpu、 Memory 、 Disk and motherboard 、 Network card, etc , Transmission media and routers should also be taken into account ,
The network environment :
In addition to considering that the testing machine and the system server are carried out in a LAN in the network environment , We should also ensure the independence of this network . If during the performance test , Other machines are also consuming router resources . Then the router will also affect the transmission speed of the database .
Four . Data preparation
In many cases , We need to prepare test data , For example, the system does not allow repeated login of the same user , Then you must generate legal user data . Sometimes the system needs to be queried and tested , Only when the system has a certain amount of data can the real performance of the system be verified . There are two pieces of data and 20 million pieces of data in a database , Same query operation , The pressure on the system is completely different .
The analysis of data required by the system can refer to the following methods :
Historical data analysis is helpful to determine the data magnitude . Start with historical data , Find out the peak data volume .
Start with other similar or identical systems , Data analysis , Find out the peak data volume .
When there is no history or related system to refer to , It is necessary to estimate the performance data of the system , Including system capacity , Concurrency number and other data , After the estimation, it will be reviewed or revised by relevant personnel , Test according to the agreed performance index .
…………
The test data should be the same as the real data , If you can get the real system running 3 Months of data , On this basis, we can conduct performance test .
About data generation , We can wish a tool complete , Such as database data generation tools , Size file generation tools, etc .
5、 ... and . Testing tools
I've already described how to analyze requirements , After the requirements are determined , We can consider what kind of tools to introduce to meet the performance requirements .
Of course , When introducing tools, in addition to considering whether they can meet the requirements , The cost of tools should also be considered , It doesn't just mean the cost of purchasing tools , And the cost of learning tools for testers .
About the choice of testing tools , There will be a separate chapter later , I won't go into details here .
If the performance testing tool you choose is not powerful enough , You may also need other auxiliary tools . If jmeter utilize badboy To record the script , It can improve the efficiency of script development . Performance counters may also be required to record the performance of software and hardware during stress testing . Such as monitoring server cpu、 Memory counter , Monitoring tool for recording middleware logs , Monitoring tools for monitoring database performance, etc .
6、 ... and . The test strategy
For a specific business system , Users usually visit in different time periods of the day . In different periods of time , Users use business systems with different frequencies , And the system's busy degree is different . Under certain conditions , Users may access a business system in a short time . For example, for the document processing subsystem , There may be a situation where a large number of users view and handle an official document in a short time . During the performance test , Should be used “ The principle of considering the worst case ”. That is, users should use the business system most frequently 、 Test the function of the system under the maximum pressure on the system , Judge whether each function and page can meet the performance requirements , Is the response time of the system too long .
On the other hand , The performance of the system must be verified “ The coverage is comprehensive ”. Although the use frequency of each function in the system is different , Some functions are used less frequently than others , But when it comes to performance testing and optimization , These functions cannot be ignored , When compiling test cases, you can't just select the most commonly used functions . For example, all users who visit my list will be notified , But generally only 5% Users will use the system setting module to find the information of a user ; But in the test , We can't because the function of viewing user information is used relatively infrequently , And ignore the test of this function . therefore , During the system performance test here , For different businesses , The access proportion of users should be reasonably allocated .
In terms of testing strategy , We should also consider , Performance of the same system in different hardware environments . So that the system can meet the requirements , The hardware configuration can also reach an optimal state . It is also a waste to add too much hardware to meet the demand . Besides, adding hardware equipment can not solve all performance problems .
7、 ... and . Manpower and time arrangement
The last item , According to the schedule and scale of the project , To arrange manpower and time . For large performance tests , Demand research in the early stage of the project , Deployment of the environment , Purchase or development of tools , Study and use of testing tools by personnel , After the performance test , Analysis and tuning of later data . All need personnel arrangement . Yes, you can need professional , System Engineer 、 Database Engineer 、 Software Development Engineer 、 The network engineer and Performance Test Engineer shall participate and cooperate to complete . Not a performance tester can do it all .
I heard that , Best cattle x Performance testing , Performance testing teams from more than a dozen cities in several countries need to synchronize . The preparatory work will take several months . How to synchronize the control performance test . Summary and analysis of later test data . It's a very complicated process . This example needs to be verified , What I want to say is , For the performance test of large projects , People and timing are also crucial .

边栏推荐
- List announced | outstanding intellectual property service team in China in 2021
- 记录一次spark on yarn 任务报错 Operation category READ is not supported in state standby
- Dark horse programmer - software testing - stage 06 2-linux and database-01-08 Chapter 1 - description of the content of the Linux operating system stage, description of the basic format and common fo
- [commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
- 为什么数字化转型战略必须包括持续测试?
- 【juc学习之路第9天】屏障衍生工具
- MySQL系列之事务日志Redo log学习笔记
- Tops, the unit of computing power of the processor, can be carried out 1 trillion times per second
- locust 系列入门
- Mask wearing detection method based on yolov5
猜你喜欢

locust 系列入门

Recent public ancestor (LCA) online practices

One of the basic learning of function

CIO's discussion and Analysis on the definition of high-performance it team

MySQL系列之事务日志Redo log学习笔记

详解ThreadLocal

Relationship and difference between enterprise architecture and project management

plantuml介绍与使用

黑马程序员-软件测试--06阶段2-linux和数据库-01-08第一章-linux操作系统阶段内容说明,linux命令基本格式以及常见形式的说明,操作系统的常见的分类,查看命令帮助信息方法,

Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue
随机推荐
One of the basic learning of function
比较版本号[双指针截取自己想要的字串]
Introduction and download of the latest version of airserver2022
locust 系列入门
MySQL之MHA高可用配置及故障切换
园区全光技术选型-中篇
QT uses ffmpeg4 to convert the qimage of ARGB to yuv422p
Smart micro mm32 multi-channel adc-dma configuration
【juc学习之路第8天】Condition
焱融看 | 混合云时代下,如何制定多云策略
Basic knowledge of ngnix
Using closures to switch toggle by clicking a button
spark analyze命令使用及其作用 map join broadcast join 广播join
Sonic云真机学习总结6 - 1.4.1服务端、agent端部署
The correct way to set the bypass route
MySQL learning notes - SQL optimization of optimization
MySQL数据库详细学习教程
【生态伙伴】鲲鹏系统工程师培训
按照功能对Boost库进行分类
MQ learning notes