1, first to build Linux under the JMeter running environment
Preparation conditions: Jdk+jmeter installation package
2. Configure Environment variables
Adding environment variables under the/etc/profile file
(1) Add JDK environment variable
VIM Profile---Enter the file i----enter edit mode
Configure environment variables at the end of the file:
Export Java_home=/home/jdk1.8.0_40export Jre_home=${java_home}/jreexport Classpath=.:${java_home}/lib:${jre_home} /libexport Path=${java_home}/bin:${path} After the configuration is complete, run the source profile----make the environment variable effective java-version----See if the configuration is successful, if the version number indicates a successful configurationsimilarly configure JMeter environment variables(2) JMETER environment variable configuration export Jmeter=/home/apache-jmeter-2.11export classpath=${jmeter}/lib/ext/apachejmeter_core.jar:${ Jmeter}/lib/jorphan.jar: $JMETER/lib/logkit-2.0.jar:${classpath}export Path=${jmeter}/bin/:${path}jmeter- V---See if the environment variable is configured successfully!!! If you encounter permissions issues, add permissions to chmod 777 *-----------Subsequent write Linux permissions modify the environment variable so that configuration is complete? (^?^*) 3, the third step is to run the JMeter script to enter the Jmeter/bin directory to run the command sh jmeter.sh-n-T getuserid.jmx-l Res.jtl-n means running the test plan in Nogui mode-T represents the test plan, followed by the test plan name-L for the test result, followed by the test result file name
This result indicates a successful run
3.1 Viewing test results
The JTL file that is generated after the previous run finishes is transferred to the visual graphical interface to open the path to open the visual graphical interface of the JMeter
Set up a test plan---Add View results tree-click Browse to import the result file---see the results
Linux Run JMeter