Install and use JMeter in Windows and Linux
1. Test in Windows environment 1. Download:
Address: http://apache.fayea.com//jmeter/binaries/apache-jmeter-2.12.zip
2. open:
Run jmeter. bat in the bin directory.
3. Use:
0>. Add a thread group to the test plan.
1> Configure the thread group, which is mainly the execution action, number of threads, and number of cycles after the samplezer Error
2> Add a test object, that is, the samplezer. Main Parameters: IP, Port, protocol, method, path, and transmitted parameters.
In the parameter section, you can directly enter the parameter name + parameter value in the Parameters box. You can also write the Parameters to the. CSV file and enter the parameter and reference parameter variable names in the Parameters box. To meet the needs of each request to change parameters.
In this test, I wrote the parameters in zset. CSV. See figure 2.1. In the. CSV file, parameters are separated by commas (,) for each behavior.
2.1> note the. CSV file format and parameter variable name.
2.2> response assertions are used to verify whether the request is successful before the test result can be obtained. Select the response field and test mode based on the actual situation.
2.3> assertion result, that is, whether each request meets the assertion requirement. If an error occurs, it is printed.
2.4> graphic results: displays test results
2.5> the summary report displays the test results
Problems encountered during testing:
The response results can be saved to a file (which can be added in the samplezer), but error % is always 100%, and the asserted results are all errors. The reason is that I added the assertion result graph result Summary Report to the layer of the thread group. It should be added to the sampling device layer. Where sampling is done, where assertions are set and where assertions are listened.
Use JMeter to perform a stress test on WebService
JMeter Installation notes in Windows
Use JMeter for basic stress testing
How to Use assertions in JMeter
For more details, please continue to read the highlights on the next page: