当前位置:网站首页>Advanced performance test series 4. premise, tool and process of performance test
Advanced performance test series 4. premise, tool and process of performance test
2022-06-21 16:10:00 【QingHan】
Catalog
- One 、 The premise of performance testing
- 1、 Research on the necessity of performance testing --- Key item assessment
- 2、 Testability --- It can be quantified as performance index value
- 3、 Insufficient corporate servers , Before the project goes online , Can I use the production environment for performance testing first ?
- 4、 Some of the company's projects have been launched but no users have used them , such as 3 The monthly project has been completed ,4 It is only available to users in months . In this case , Can I use the production environment for performance testing ?
- Two 、 Performance testing tools
- 3、 ... and 、 Performance testing process
One 、 The premise of performance testing
1、 Research on the necessity of performance testing --- Key item assessment
Do a performance test , The first thing to do is Evaluation of key items .
This product of the company needs to be tested . You need to know which functions need to be tested first , Which functions will be tested for performance .
If the product has 100 Features , There is not even a priority , I took the 100 The three functions are tested together , So I lost the watermelon and picked up the sesame , Nothing .
1) Department in charge 、 Regulatory review ;
2) Involving the safety of life and property ;
Like the banking system , It's been revised recently , The new version replaces the old one , If there is no performance test , In case of high concurrency , data ( money ) There is a problem , It's going to be a lot of trouble .
3) Big new systems ;
When the new version replaces the old version , It must be the performance test of the new version , Otherwise, the response time will be longer , Worse performance , The worse the user experience .
4) The core system ;
For example, there are 100 One business , It must be doing Core business , Or the most used by users first .
The priority and importance of the business need to be assessed , There is not so much time for performance testing of any business .
5) Structural adjustment ;
If the company develops projects with 1.8 Of jdk, Now there is jdk1.11, Find out jdk1.11 There are many new features .
I just put jdk Upgrade to 1.11 edition . After upgrading , There is no problem with the function test , But there may be performance problems .
jdk This thing is the bottom thing , To run java The code must have jre Operating environment , Installed in the operating environment jdk、jre.
This is the underlying dependency , If the performance of this underlying dependency does not meet the requirements . After the product goes online , The function is OK , But once the user comes up, there will be performance problems .
So this bottom adjustment , It also requires comprehensive performance testing .
6) There's a surge in business ;
This kind of promotion , Performance testing must be done before launching .
Although this is not the core business , This kind of promotion is over , You may not use this page again next time , But because of its particularity , Performance tests are also required .
7) Major defect repair .
There are some old pits in the projects of some companies , Finally, it took time and cost , Changed a lot of things , One day he repaired the pit .
After the pit is repaired , It's a big influence , The functional tester shall work overtime to test , Performance testers also have to work overtime to test performance .
Because when the old pit was repaired , Changed the bottom things , The performance of the underlying things has not kept up , No problem with the function , But there may be a lot of code that needs to be tweaked .
Repair of major defects , Generally, the bottom level will be changed widely , After the repair, performance test is required .
2、 Testability --- It can be quantified as performance index value
If your company's project is product oriented , The product personnel put forward the demand for this performance , He doesn't know about performance testing .
If your company is this kind of project oriented , The project manager does not understand performance testing .
So what they need , It's hard to do performance tests . But you also have to do performance tests , Then you need to master the knowledge and skills of performance testing , Come and talk to your supervisor Communicate repeatedly to determine performance indicators .
3、 Insufficient corporate servers , Before the project goes online , Can I use the production environment for performance testing first ?
The project has not been launched yet , The code has not been put into the production environment , Performance testing is not possible .
Although some enterprises switch the production environment to the test environment , The key is that the code has not been put into the production environment , Since the code has not been updated in the past , You can't do performance tests .
If you don't finish testing, put the code into the production environment , Let you do a performance test , This is equivalent to being online .
If your company has a grayscale publishing environment , This is OK .
If the production environment has 30 Taiwan machine , You can split several machines from them and update the code first , Use some real users to experience this new function .
See if the new features meet their requirements . If meet , Then update the remaining machines with new codes .
This actually divides the production environment into 2 An environment , One is old code , One is the new code .
You can use this environment , But pay attention to the problem of database . When the production environment is a grayscale publishing environment , Generally, the database will also be used for 2 individual .
Especially if the database has a table structure change , If you don't have two databases , Grayscale publishing environment is not available .
But you have to switch the database of the grayscale publishing environment , You cannot publish the database of the environment in grayscale , Because there will be dirty data in the gray-scale publishing environment after use .
Because the grayscale publishing environment , One day it will be transformed into a formal environment .
The dirty data is in the database of the gray-scale publishing environment , One day, it will become dirty data in the production environment .
4、 Some of the company's projects have been launched but no users have used them , such as 3 The monthly project has been completed ,4 It is only available to users in months . In this case , Can I use the production environment for performance testing ?
The product has been released online , But there are no users . Or it will iteratively release new functions to the production environment , Let potential customers experience first , After experiencing , Meet the customer's requirements , There will be real paying users to use .
This situation , If you do a performance test, there will also be dirty data . Cleaning up dirty data in the production environment is not clean .
Backup first , Then do performance tests , After that, use the backup to restore , The success rate of cleaning up dirty data in this way is not high .
And there are cost and operational risks , Under normal circumstances, the company will not let you do this .
Two 、 Performance testing tools
Open source :jmeter
java Development 、 Cross platform 、 Quick version update ( Suggest v5.1.1 in the future +jdk1.8).
business :loadrunner
Performance test benchmarking software 、c Language 、 Domestic cracking (< lr11)、lr12 Free trial 50 Limit the number of users 、 Slow update .
Since the research :python+locust
python The language is developed by itself .
3、 ... and 、 Performance testing process
1. Preparation for performance test
- 1) Demand analysis ----- Familiar with the business .
- 2) Clear performance test objectives ( Index value ).
- 3) Learn about software functions 、 framework .
- 4) Specify the test plan , Do a good job of workload assessment .
- 5) Develop a test model ( Edit test cases ).
It is different from functional test , The same thing is that we all need to do demand analysis .
Functional testing focuses on a single person initiating a request , The purpose is to find bug. But professional performance testers focus on multiple people making requests , At this time, the function appears bug, I don't care .
Do not directly understand the business , But understand the overall data flow 、 The overall structure 、 Overall function .
Implementation of functional logic of specific interface , It doesn't matter if I don't know . However, it is necessary to understand how the functions interact with each other as a whole , Which function needs to depend on what data .
Server architecture , How to exchange data between services , What kind of configuration , This has to be clear . Because we need to know these things before setting up the environment .
Workload assessment : It will be better than functional test 、 Automated testing takes a long time . Equal work , The time consumed is probably theirs 2-3 Times of time .
Not all functions need to be tested , Only some functions are tested .
Test cases are transformed into performance test scenarios 、 Load test scenarios, etc .
2. Build a performance test environment
- 1) Tool selection and preparation .
Different agreements , Will use different tools .
- 2) Build the environment of the system under test ( The server 、 Service version update 、 Database data preparation 、 Monitoring the environment ).
Before testing , The data level of the database should be prepared .
- 3) The network configuration .
3. Performance test script development
- Select protocol .
- Making scripts .
- Debug script .
- Validation script .
You can make scripts in the test environment , Debug script .
In development , Functional testers are also testing , The scripts written by performance testers can directly connect to the test environment .
In the future, only the environmental ip Connect to the performance test environment , You can perform performance tests in the performance test environment .
Script development is not affected , Because the code of the functional test environment is updated before the code of the performance test environment .
Debug scripts and validation scripts , It will be gradually transferred to the performance environment .
4. Performance test script execution
- A test run .
- Scene execution .
Use test cases in scripts , Perform scene conversion , Execution scenarios .
To build a monitoring environment , Collect performance data for test results . It is used to analyze and tune the performance test results later .
5. Result analysis and tuning
- 1) The analysis is based on : The result chart .
- 2) Analysis methods :
Server hardware bottleneck > Network bottleneck > The server os bottleneck ( Parameter configuration 、 database 、web The server )> Application bottleneck (sql sentence 、 Database design 、 Business logic 、 Algorithm ). - 3) tuning .
- 4) Modify the script or scene .
6. Test report and result tracking
- Performance test report .
- Performance test problem tracking .
The performance problems found cannot be solved this time . For example, a memory problem is found , It may be the structural adjustment of the code to solve this problem .
It can't be solved in the current period .
Then it will be solved later , And then repeatedly verify and debug , See if this problem has been really solved .
边栏推荐
- 最近学习的一些思考,附上答案,后续还需深入学习开发知识。
- [deep learning] was blasted by pytorch! Google abandons tensorflow and bets on JAX
- Unity grid programming 09
- TypeScript(6)函数
- Soft test intermediate network engineering test site
- Someone is storing credit card data - how do they do it- Somebody is storing credit card data - how are they doing it?
- Go language - structure
- addslashes,stripslashes
- 高级性能测试系列《5.服务器的发展、vmware虚拟技术》
- Score-Based Generative Modeling through Stochastic Differential Equations
猜你喜欢

Standing at the digital tuyere, how can tooling enterprises' fly up '

33岁程序员的年中总结

Tomb. Weekly update of Finance (February 14-20)

Someone is storing credit card data - how do they do it- Somebody is storing credit card data - how are they doing it?

关于#sql#的问题:sql中有人知道这些问题大概是怎么解答吗?

A pit trodden in the equivalence comparison of integer

WEB3 安全系列 || 攻击类型和经验教训

RichardSutton:经验是AI的终极数据,四个阶段通向真正AI的发展之路

Distributed analytical database star ring argodb 3.2
![[deep learning] was blasted by pytorch! Google abandons tensorflow and bets on JAX](/img/2b/863760eb1d1f0ee7a596d3995e6bd3.png)
[deep learning] was blasted by pytorch! Google abandons tensorflow and bets on JAX
随机推荐
三胎终于来了!通用智能规划平台 - APS模块
Unity grid programming 09
最近学习的一些思考,附上答案,后续还需深入学习开发知识。
The third child is here at last! General intelligent planning platform - APS module
Uniswap去中心化交易所系統開發方案
Isn't this another go bug?
Web page automation practice "1. use the PY third-party library selenium to complete the access operation of elong"
镜像中的 Everything, GnomeLive ,KdeLive ,livecd ,NetInstall的区别?
站在数字化风口,工装企业如何'飞起来'
真香!十五分钟搞定智能标注、模型训练、服务部署……
Native JS routing, iframe framework
[redis] basic operation of key
Uniswap decentralized exchange system development scheme
Tomb. Weekly update of Finance (February 14-20)
Research Report on the overall scale, major manufacturers, major regions, product and application segmentation of global market full body massage chairs in 2022
[pytorch basic tutorial 29] DIN model
Write commodity table with JSP
Encryption market "escape": clearing, selling and running
堪称神作!啃透这份JVM笔记,轻松搞定阿里30K面试!
Selection (036) - what is the output of the following code?