当前位置:网站首页>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 .
边栏推荐
- Unity uses SQLite
- linux下清理系统缓存并释放内存
- Can you get a raise? Analysis on gold content of PMP certificate
- Basic operation of binary tree
- MySQL learning notes - SQL optimization of optimization
- Airserver mobile phone third-party screen projection computer software
- 记录一次spark on yarn 任务报错 Operation category READ is not supported in state standby
- One of the basic learning of function
- PHP reflective XSS, reflective XSS test and repair
- 园区全光技术选型-中篇
猜你喜欢
首席信息官对高绩效IT团队定义的探讨和分析
"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition
Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue
EasyExcel 复杂数据导出
91.(cesium篇)cesium火箭发射模拟
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
[deep learning] use deep learning to monitor your girlfriend's wechat chat?
详解LockSupport的使用
Business visualization - make your flowchart'run'up
Why does blocprovider feel similar to provider?
随机推荐
Mysql——》Innodb存储引擎的索引
焱融看 | 混合云时代下,如何制定多云策略
内存导致的电脑游戏中显示hdmi无信号 从而死机的情况
MySQL之MHA高可用配置及故障切换
One of the basic learning of function
按照功能对Boost库进行分类
LC669. 修剪二叉搜索树
flink sql 命令行 连接 yarn
Communication between browser tab pages
Separate the letters and numbers in the string so that the letters come first and the array comes last
微软、哥伦比亚大学|GODEL:目标导向对话的大规模预训练
【直播回顾】战码先锋首期8节直播完美落幕,下期敬请期待!
黑马程序员-软件测试--06阶段2-linux和数据库-01-08第一章-linux操作系统阶段内容说明,linux命令基本格式以及常见形式的说明,操作系统的常见的分类,查看命令帮助信息方法,
高攀不起的希尔排序,直接插入排序
Getting started with the lockust series
ICML2022 | 基于元语义正则化的介入性对比学习
Count the number of each character in the character
Clean up system cache and free memory under Linux
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
Mask wearing detection method based on yolov5