First, install the JMeter
1, the last JMeter compressed package to a Linux server, such as:/opt directory
2, decompression unzip Apache-jmeter-3.1.zip
3. Configure Environment variables: vi/etc/profile
Add at the end:
Export jmeter_home=/opt/apache-jmeter-3.1
Export path= $JMETER _home/lib/ext/apachejmeter_core.jar: $JMETER _home/lib/jorphan.jar: $JMETER _home/lib/ Logkit-2.0.jar: $JMETER _home/bin: $PATH
Save exit
4, implementation: Source/etc/profile configuration Effective
5, check whether the configuration is successful: jmeter-v
II. Preparation of test plans
1, create a good test plan in GUI mode, upload to Linux server
2. Edit Test Plan VI test plan. JMX
Indicate: number of threads, load completion in seconds, start time, end time, whether scheduler is turned on, duration (seconds), startup delay (seconds)
III. implementation of the test
1. Enter the Jmeter/bin directory to execute:./jmeter.sh-n-T JMeter handwriting bugfree script. Jmx-l LOG_VU1.JTL
This command is expressed as: using native run JMeter in non-GUI mode, the test script executed is: JMeter handwriting bugfree script. Jmx, and output the resulting file to the current directory with the file name Log_vu1.jtl
2. End of execution
3. Parameter description
- -H help print out useful information and exit
- -N Non-GUI mode run JMeter in non-GUI mode
- -t test file, JMeter test script file to run
- Files that record results with-l log file
- -R remote execution, starting remote service
- -H proxy Host, setting up the proxy host used by JMeter
- -p proxy port, setting the port number of the proxy host used by JMeter
Iv. Analysis of results
1, save the result file to the Windows system, start JMeter Add aggregation report, the number of transactions per second, etc.
Aggregated reports:
Number of transactions per second:
Using JMeter to do performance testing under Linux