Joke Collection Website - Public benefit messages - Jmeter verification code registration interface stress test actual combat
Jmeter verification code registration interface stress test actual combat
The test website provided is: /security/register.
When using a Chrome browser, first clear the browser's cookies cache.
After clearing, open the website to be tested, press F 12, enter the mobile phone number to be registered, such as "18300987622", and click "Send verification code". You can see that the requested interface is: /security/smsCode.do, and the requested parameters are data in json format: {"mobile": "660. " Func ":"register ","isvalidate": "1", "memkey": "register-18300987622", "memvalue": "7f4be3a-be2f-48c7-91ed.
Under the existing conditions of the default environment (how to build the jmeter running environment is not described too much here, please go online to find the relevant information of environment construction), double-click jmeter.bat to display the following interface setting tool's display language, with options → Select language → Chinese.
After completing the above steps, create an HTTP request, including an HTTP request header, an HTTP request body and a view result tree.
1. Add a thread group to the test plan.
2. Add a configuration component HTTP header manager to the thread group, select and copy the request header of the newly registered page, and click "Add from Clipboard" in HTTP header manager to complete the copy of the request header.
3. Add an HTTP request to the thread group, and the request body of the request is the following.
4. Add a view tree to the thread group and click the Start button to view the request results.
5. Add the assertion to the response result. Only when the response result contains the response data of "msg": "SMS sent successfully" can the request be considered successful.
Five users were simulated to carry out the above test process, and it was found that only the first time was successful, and the rest returned "msg": "SMS verification code was sent too frequently"
It turns out that the mobile phone number requested every time is the same, which leads to failure.
At this point, you can use to configure components. The CSV data file is used to set the mobile phone number of each request. Here, I approved an excel file of mobile phone number. It should be noted that when saving this file, it should be saved in. CSV format. Here, I will put this file in jmeter's examples directory.
Fill in the following information in the CSV data file configuration, then modify the request body of the HTTP request in the verification code interface, and finally execute it again. It is found that the mobile phone number used in each request is different, and the request is successful.
Modify thread group parameters, add aggregation report, etc. And pressure test the interface. You can disable viewing the result tree here, because it will affect tool performance in many requests. Final results
It should be noted that when the prompt of jmeter.bat is started, the non-interface mode should be used for stress testing, and the interface mode should be used to generate scripts. If there is no problem in debugging, then the interfacial stress test is necessary.
This part of the content can be queried online for package related information, so I won't explain it here.
This platform can frequently brush the verification code interface, which is a bug in itself. The front slide verification function is useless.
If you see these, I hope you can look at this blog post, Jmeter verification code, image recognition and registration interface stress test, hoping to gain something for you.
- Previous article:What is the short message code of the mobile phone card?
- Next article:Can I apply for an electronic driver's license in the applet?
- Related articles
- I forgot my bank card number. How can I check it?
- I want to find a girlfriend. This is my first time. How should I write a love letter?
- Heilongjiang Postgraduate Preliminary Examination Result Announcement Time
- The advertisement for winter vacation class enrollment is very short.
- How can I check the quota if I don't get the credit card of Shanghai Pudong Development Bank?
- What if Xiaomi's mobile phone can't unlock the screen lock?
- When can I put strategic advertisements in the sand table course?
- Software engineering course design residential property management system, email address 5654185 14@qq.com, you can add more points.
- Feng Chun's composition
- Do people from Qingyuan need nucleic acid testing when returning to Qingyuan from Shanghai in November? Does Qingyuan City need nucleic acid testing?