当前位置:网站首页>Jmeter- (V) simulated user concurrent login for interface test
Jmeter- (V) simulated user concurrent login for interface test
2022-06-23 03:23:00 【Hello, test】
Preface :
This time mainly introduces the use of Jmeter Simulate user concurrent login , Test interface performance :
( One ) read CVS The configuration file
( Two ) Read database
( One ) read configuration file
advantage : Easy to learn , Easy to use
shortcoming : It is not applicable to concurrency with a large number of users , For example, testing 1 Million users concurrently , You need to manually write tens of thousands of pieces of data to the configuration file , Hands hurt ~
1. Add thread group
Right click test plan -> Threads -> Thread group

Parameter interpretation :
Number of threads : Number of concurrent users
Ramp-Up Time ( second ): How long it takes to start all threads
① 0 Concurrent on behalf of ;
② If the number of threads is 3, The required duration is 3S, be 3/3=1 every other 1S Start a thread ;
③ General Settings Ramp-Up= Number of threads , Then adjust it up and down to the desired .
cycles : Check Forever And keep doing it
2. Add synchronous timer , Set assembly point
explain : Its function is to block threads , Until the specified number of threads arrives , And release it together , It can create a lot of pressure in a moment
Thread group right-click -> Timer -> Synchro timer

Parameter description :
The number of simulated user groups : Number of threads released at the same time
The timeout is in milliseconds : That is, how many milliseconds after the timeout, release the specified number of threads at the same time .
- If set to 0,Timer Will wait for the number of threads to reach “Number of Simulated Users to Group by” The value in is released ;
- If it is greater than 0, If the number of threads set above has not been reached after this time ,Timer All threads will be released .
3. A parameterized
Thread group right-click -> The configuration element ->CVS Data file settings


4. add to http request , Call parameters

5. Check operation
View the concurrency by viewing the result tree and the aggregation report .

( Two ) Read database
advantage : It is suitable for large-scale user concurrent testing , And the maintenance cost is small .
1. Add thread group
2. Add timers
3. Add database configuration
Thread group right-click -> The configuration element ->JDBC Connection Configuration

4. Get the login account and password from the database
Thread group right-click -> Sampler ->JDBC request request

5. add to http request
${__V(name_${__Random(1,10,)})}: The function is used here , Random login 10 This user

You can use tools -> The function Assistant dialog box generates

5. Check operation
View the concurrency by viewing the result tree and the aggregation report .

Hello Test, So far we Jmeter Simulation concurrency has been introduced , We choose the best solution according to the number of users . Later, we will give a special article on how to view the aggregation report ? Pay more attention to , finger heart ~
边栏推荐
- How to set jewelry label paper
- Chaoscraft: join your girlfriend in Hackathon show -- Interview with the skate team
- How does native JS get the child elements of the parent element that the current element belongs to
- Operating wechat cache by using wechat low code
- JS asynchronous mechanism
- About SSL certificates
- Online signature with canvas
- Postman calls relevant interfaces of CLS API 3.0
- 6 values in JS are 'false'
- How audio and video technology provides a completely true and stable new experience for the meta universe
猜你喜欢
![Analysis of the number of urban residents covered by basic medical insurance, their treatment and medical treatment in other places in China in 2021 [figure]](/img/81/4d3cb059f700dd9243645e64023be7.jpg)
Analysis of the number of urban residents covered by basic medical insurance, their treatment and medical treatment in other places in China in 2021 [figure]
![Analysis on the development prospect of China's brain computer interface industry in 2021: wide application prospect, sustained and rapid growth of market scale [figure]](/img/84/192d152ceb760264b6b555b321f129.jpg)
Analysis on the development prospect of China's brain computer interface industry in 2021: wide application prospect, sustained and rapid growth of market scale [figure]
![Analysis on demand and market scale of China's steamed stuffed bun industry in 2020 [figure]](/img/4b/dd272f98b89a157180bf68570d2763.jpg)
Analysis on demand and market scale of China's steamed stuffed bun industry in 2020 [figure]
![Analysis of China's integrated circuit industry chain in 2021: huge downstream market demand [figure]](/img/de/d73805aaf4345ca3d2a7baf85aab8d.jpg)
Analysis of China's integrated circuit industry chain in 2021: huge downstream market demand [figure]

Encryption related to returnee of national market supervision public service platform

Analysis on the development of China's graphene industry chain in 2021: with the support of energy conservation and environmental protection policies, the scale of graphene industry will continue to e
![[quick view] Analysis on the development status and future development trend of the global and Chinese diamond cultivation industry in 2021 [figure]](/img/f1/972a760459a6d599b5681aa634df09.jpg)
[quick view] Analysis on the development status and future development trend of the global and Chinese diamond cultivation industry in 2021 [figure]
![Analysis on development history, industrial chain, output and enterprise layout of medical polypropylene in China in 2020 [figure]](/img/28/ebfc25ec288627706e15a07e6bdb77.jpg)
Analysis on development history, industrial chain, output and enterprise layout of medical polypropylene in China in 2020 [figure]

Analysis on the development of China's satellite navigation industry chain in 2021: satellite navigation is fully integrated into production and life, and the satellite navigation industry is also boo

Analysis on the development of duty-free industry in Hainan Province in 2021: the implementation of the new policy makes the duty-free market in Hainan more "prosperous" [figure]
随机推荐
Goframe framework (RK boot): realize distributed log tracing
Analysis on the development prospect of China's brain computer interface industry in 2021: wide application prospect, sustained and rapid growth of market scale [figure]
[burning] Tencent cloud high tech computing platform HTPC cloud elastic cluster release!
Online signature with canvas
About SSL certificates
Why don't I suggest you use "! = null" to judge empty space?
JS event bubble and event capture
Transformation solution of digital intelligent supply chain platform for project management in engineering industry
How to store easydss version 3.0 video files in other free disks?
Batch generation of Codabar codes using Excel files
Analysis of the number of urban residents covered by basic medical insurance, their treatment and medical treatment in other places in China in 2021 [figure]
Integrated solution for intelligent supply chain platform management in rubber industry
Tachometer script
Configuring multi cluster management using kubectl
PHP code specification
Intelligent voice climbing patio
Account protection and use scheme
What about the high cost of storage system? The original computer room can save so much money!
JS asynchronous mechanism
Mybatties plus batch warehousing