Use jmeter to realize simple user login concurrent operation

foreword

Stress testing was involved when writing the test outline, so I learned jmeter and simply tested the concurrent login of multiple users.
insert image description here
This requirement can be met by general systems, but Party A must have a testing process.
I tested it according to a management system I made before. For simplicity, I hide the login verification code.

1. Ruoyi hides the login verification code

Ruoyi comes with its own tool, which is very convenient to hide the verification code.

2. Create a thread

Several processes are several users, and Ramp-up is set to 0 to approximate the concurrent operations of these 10 users.
insert image description here
The number of threads is 10, and the Ramp-up time is the time when all processes are completed. What I found out means that the last process must start before the first process ends. Windows seems to support 1000 threads. I tested that 1000 threads cannot run concurrently on my computer.
insert image description here

3. User parameters

insert image description here
Here you need to parameterize the account password for login first. For details, you can take a look at the dark horse programmer at station B. I just read a few sections. The two parameters here are the account password required for login. I just added a user here, and it is possible to implement multiple users. Both database and csv files can be read through jdbc.

4. http request

insert image description here
The test here is my management system. When I log in, I post. I don’t have much development. I don’t know what the path of the request is. Finally, I find it here, and click Login on the login interface. The path is the parameter sent
insert image description here
by dev-api/login together with the request. Some problems with the final response data need to add a header information
insert image description here

insert image description here

5. View the result tree

insert image description here
Finally, the login was successful, and the simple logic can be realized.
insert image description here
But this content did not request success. Let's do that for now.

Guess you like

Origin blog.csdn.net/wujian0428/article/details/131856004