Jmeter installation
1, you need to install JDK before installing Jmeter, 1.8 version of JDk here I installed version 3.0 of Jmeter (I recommend installing version 3.3) is installed.
JDK download link: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Jmeter Download Link: http://jmeter.apache.org/download_jmeter.cgi
After the download is complete, double-click unzip the zip file
Into the extracted directory
2, double-click to open the ApacheJmeter.jar jmeter interface.
3, used here as a test example Baidu
Baidu Web site: www.baidu.com ? / S IE = UTF-8 & WD = jmeter performance test
Request parameters: wd: jmeter Performance Test
4, script writing Jmeter
4.1, adding a thread group
Right-click the "Test Plan" -> "Add" -> "Threads" -> "thread group."
Thread Group: number of simulated users, here, the number of threads 5, i.e. the number of users is five
Period: this is set to 2 seconds, 2 seconds to start the thread 5
Cycles: number of cycles of the thread, here set to 2, i.e. five threads (the number of users 5) 2 cycles. If you check the number of cycles as always, the thread will always send the request until the shutdown script.
Delay Thread creation until needed: to create a thread to be delayed until the time.
Scheduler: Start Time Set the thread group start and end time (when configuring the scheduler, you need to check the number of cycles as always)
Duration (seconds): test duration, will cover the end time
start delay (seconds): Test delayed start time, will cover the start-up time
start-up time: test start time, start delay will cover it. When the start time has passed, just manually test the current time will be covered by it.
End time: end of the test period, the duration will cover it.
4.2, add http request
Right-click the "thread group" -> "Add" -> "Sampler" -> "Http request"
Server name or IP: Enter the destination URL or target IP.
Port Number: The default is 80.
Protocol: Fill http request
Method: This method is GET request (as well as other ways GET, POST, HEAD, PUT, OPTIONS, TRACE, DELETE, etc.)
Path: target URL, (fill in addition to the remaining portion of the URL and parameters).
Together with the request parameters sent: Parameter name (wd), because the parameter name Baidu website is wd. Value their own search terms. Checking code behind.
4.3, adding the result tree view
Right-click on the "thread group" -> "Add" -> "listener" -> "View results tree"
Modify the response data format is "HTML Source Formatted", click on the "response data" to see the response results.
4.5, see the results in tabular
Right-click the "thread group" -> "Add" -> "listener" -> "View Results in tabular"