The two days because of the first-line project to carry out stress tests, more urgent, the use of unfamiliar jmeter. Although previously used for a period of time loadrunner, but because it is too heavy, the installation is more complex, the pressure machine and pressurized machine requirements are relatively high, and I do not have the use of Linux experience. What's more, it's a charge, and it takes a pretty expensive price to buy license, so give it up and choose a lighter jmeter.
In principle JMeter and LoadRunner are all the same, through scripting code to simulate multiple users to the server to send requests.
It's quick to get started, but it's a headache if something goes wrong. Originally in the WIN7 graphical interface to create a test plan, write good code ran a few times there is no problem.
But deploying to the server is much more troublesome, the biggest problem is to run the script with the command, run out of the results to dump to the file, then download to the Win7, and then open with JMeter to see the analysis results. There are times when data is loaded into memory bloat, often oom-_-.
Despite several struggles, the process of command-line execution is well-considered. But when it comes to running real data, the log always reports the timeout exception.
Misled by this hint, always thought is the connection server timeout, then start from the server to find the reason:
- Using the ping command and the Telnet command, you can confirm that the server port is accessible
- The interface has authentication judgment. Check the code to see the log ask the developer, ruled out this possibility
- Chazhi, hit log, found that the database did return the correct data, which excludes the possibility of database access timeouts
- Because it is not officially on-line, there is no interception such as DDoS, excluding the possibility of being restricted by the system
Here, the problem is still unresolved, has begun to despair, the whole person is not good. The most shameful thing is that the wrong API can return an error, but it's too much to get the right API to go out of the way.
Finally, only a little bit of troubleshooting the script problem. n multiple interfaces were changed, and N multiple host settings and interface paths were checked. Change the test once. Finally, when the assertion is removed, the timeout exception suddenly disappears-_-.. The test plan went through. After repeated testing, I finally realized that when JMeter executes an assertion in command-line mode, it will always report a timeout if the assertion result is true.
I don't know why, and it's too bad to be misled by two days of wasted time.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Jmeter "Get a long connection time" exception on the Linux command line