1. Installation stage
1. Install badboy http://www.badboy.com.au/
2. Install jmeter http://jmeter.apache.org/ , unlike badboy fool next, you need to configure system environment variables
Variable name: JMETER_HOME
Variable value: C:\ProgramFiles\apache-jmeter-2.11
Variable name: CLASSPATH
Variable value: %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;
%JMETER_HOME%\lib/logkit-2.0.jar;
After the creation is complete, click " OK"
The second stage of recording
1. Open badboy and enter the test URL
You can see that the script has been recorded
One more script after login
Exit, the script has one more line
Save the script and click Export to JMeter in File in the upper left corner
(2 ) Use Jmeter to open the script recorded by badboy for analysis
The number of concurrency can be defined in the thread group, Number of Threads (users): One user occupies one thread, if the number of threads is 20, that is, 20 users are simulated; Ramp-Up Period (in seconds): Set how long the thread takes all Start, the duration is 10, you need to start 2 threads per second; LoopCount: The number of times each thread sends requests, if the number of threads is 20, the number of loops is 10, and each thread sends 10 requests. ", all threads will keep sending requests until the script is manually stopped
Right-click on the thread group to add a listener, run view
Note: Aggregated report analysis
Label : The Name value of each JMeter element. For example, the Name of the HTTP Request
Samples : The number of requests made. As recorded in the third line, simulate 20 users and loop 100 times, so 2000 are displayed
Average : Average response time (unit: ). The default is the average response time of a single Request. When the Transaction Controller is used, the average response time can also be displayed in transaction units.
Median : the median, which is the response time of 50% of users
90%Line : Response time for 90% of users
The maximum response time may be 1/1000 or even 1/10,000, and the probability of occurrence of the minimum response time is also very small.
Min : Minimum response time
Max : maximum response time
Error% : The number of requests with errors in this test / the total number of requests
Throughput : Throughput. By default, the number of completed requests per second is indicated (the specific unit is as shown in the figure below)
KB/sec : The amount of data received from the server side per second.