当前位置:网站首页>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 ~
边栏推荐
- About SSL certificates
- What should be prepared to develop the company's official website?
- Integrate Tencent maps with micro build and low code
- Analysis on the development status of China's watch industry in 2021: a large number of electric watches are imported [figure]
- Transformation solution of digital intelligent supply chain platform for project management in engineering industry
- Cross tenant data integration link connection
- JS to determine whether the page is opened for the first time today
- Learning record -- superficial understanding of unity decoupling
- Methods for MySQL to avoid inserting duplicate records
- How does easyplayer embed a video snapshot into a demo?
猜你喜欢
![Analysis on the development status of China's watch industry in 2021: a large number of electric watches are imported [figure]](/img/ca/672bfe49c8123da8679b2abeb43a2e.jpg)
Analysis on the development status of China's watch industry in 2021: a large number of electric watches are imported [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]

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

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 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 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 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]

Encryption related to returnee of national market supervision public service platform

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]
![[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]
随机推荐
CFS topics
YouTube security scenarios
CentOS install redis
SAP mm initial transaction code MEK1 maintenance pb00 price
Understand one article: build an activity analysis system
Intelligent voice climbing patio
JS event bubble and event capture
Reading redis source code (II) underlying data structure
Easysearcher cannot find the IP address of easynvr hardware. How to solve it?
Build a weather forecast applet using a widget
How to share small programs released by wechat
Reading redis source code (VI) multi threading of redis 6.0
Zoom/skype/ nailing / live broadcast / conference / online video real-time subtitle generation and translation, simultaneous interpretation
2022-01-27: heater. Winter has come. Your task is to design a
Construction and exploration of vivo database and storage platform
How audio and video technology provides a completely true and stable new experience for the meta universe
The difference between code39 and code93
The performance of the new Tokio scheduler is improved by 10 times
JS event delegation (event agent)
Cve-2021-4034 reappearance