Interface performance test - Jmeter concurrency and continuous pressure test

Interface pressure test method:

1. Simultaneous concurrency: set the thread group, execution time, and number of cycles. This method can control the number of interface requests. 2.
Continuous pressure measurement: set the thread group, number of cycles, check "forever", scheduler (duration), This method can control the pressure test cycle time

Specify the number of concurrency

Example 1: Set the number of threads: 10 Set the execution time: 0 Set the number of loops: 5

Description: Make 10 threads start and run at the same time, that is, execute 10 threads concurrently. 10 threads are a sample, and each sample is executed 5 times in a loop. You can use the listener tree to view the execution effect of the thread group, and 10 threads appear together.

Example 2: Set the number of threads: 10 Set the execution time: 20 Set the number of loops: 5

Description: 10 threads start and run in 20 seconds, and each thread will start 20/10 seconds after the previous thread starts, that is, a thread is executed at an interval of 2s.

10 threads are a sample, and each sample is executed 5 times in a loop; using the listening tree, it can be seen that requests appear at intervals

Continuous pressure test

When the leader said: Continuous 24-hour pressure test on interface XX? What should we do at this time?

The scheduler can control the duration of the pressure test and the delay of thread startup, as follows:

Loop count: forever (forever) Duration (seconds): duration Starup delay (seconds): start delay time

Example 3: Set the number of threads: 10 Set the execution time: 0 Set the number of cycles: Check "Forever" to use the scheduler, set the duration: 60

Description: 10 threads execute concurrently at the same time. Continuous loop execution for 60s, no limit on the number of samples (10 threads concurrently at intervals of 0s)

Continuous pressure test results:

Jmeter pressure measurement

Generally, the pressure test time is 10-15 minutes, and the setting time is set in the scheduler configuration--duration, for example: if you want to press for 10 minutes, then enter the duration: 600

①Number of threads: the number of users sending requests, that is, the number of concurrency

②Ram-up Period: Enter 1 here, which means that all threads will be started within 1 second

③Number of cycles: If you check forever, it will continue to cycle. In this example, 60 is filled in, that is to say, 60 is multiplied by the number of threads 100, and a total of 6000 requests are sent.

In theory, these requests will be sent and completed in 60 seconds. But affected by machine configuration and current network, usually this number is longer than 1 minute.

The following are supporting learning materials. For friends who do [software testing], it should be the most comprehensive and complete preparation warehouse. This warehouse also accompanied me through the most difficult journey. I hope it can help you too!

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/IT_LanTian/article/details/132368976