Performance testing - Jmeter commonly used three timers

1. Synchronous timer

Location: HTTP Request -> Timer -> Synchronizing Timer

When it is necessary to perform concurrent testing of a large number of users, in order to allow users to execute at the same time, add a synchronous timer, the user blocks the thread, and starts to execute the operation of the sampler until the number of threads reaches the pre-configured value

Test absolute concurrency, such as flash sales, panic buying and other scenarios, the results should be viewed with aggregation reports

Simple case: Simulate 50 users accessing Baidu at the same time

Thread group configuration:

Timer configuration:

Timeout: It must be configured. When the number of users does not reach the number of simulated user groups, the thread will always be blocked. After configuring the timeout, when the waiting time is greater than this time, it will not continue to wait.

It cannot be configured too small. If it is too small, when the number of users does not reach the number of simulated user groups, the request will be sent.

Aggregate report:

2. Fixed timer

Function: delay interface request sending location: test plan -> thread group -> HTTP request -> timer -> fixed timer

Parameter introduction: thread delay (milliseconds): how many seconds to delay sending the interface request in the scope

3. Constant throughput timer

Application scenario: load test (according to demand, send a specified number of interface requests per unit time-throughput)

Function: Let JMeter execute according to the specified throughput, in units of per minute.

Location: Test Plan->Thread Group->HTTP Request->(Right-click Add) Timer->Constant Throughput Timer

Parameter introduction: Target throughput (in samples per minute): Target throughput. Note that here is the number of requests sent by each user per minute Case requirements: Simulate the real business scenario requirements of users: 20QPS If the number of threads is set to 1, the target throughput is set to 20*60=1200 If the number of threads is set to 10, then The target throughput is set to 20*60/10=120 (10 users send 1200 requests, and one user is 120)

Finally, I would like to thank everyone who has read my article carefully. Seeing the fans’ growth and attention all the way, there is always a need for reciprocity. Although it is not a very valuable thing, if you can use it, you can take it away!

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

Information acquisition method:

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/132699357