Linux uses JMETER for distributed stress testing

1. Download the jmeter tgz file http://jmeter.apache.org/download_jmeter.cgi

2. Log in to the linux server, create a jmeter directory, and upload jmeter to rz

3. tar xvf + jmeter tgz file name

4. Add jmeter environment variable vi /etc/profile

Added: JMETER=/data/soft/jmeter/apache-jmeter-3.0 //Own installation path
CLASSPATH=$CLASSPATH:$JMETER/lib/ext/ApacheJMeter_core.jar:$JMETER/lib/jorphan.jar:$JMETER/ lib/logkit-2.0.jar
PATH=$PATH:$JMETER/bin

5. source /etc/profile

6. jmeter -v to see if the setting is successful

7. Create a testplan testresult subdirectory in the jmeter directory

8. rz upload jmx script to testplan

The script uses beanshell: (you can output the return to jmeter.log)

prev.setDataEncoding("UTF-8");
String response_data = prev.getResponseDataAsString();
log.error("response_data----------------:"+response_data);

9. If there is a host, enter /etc/hosts to add your own host configuration

Guess you like

Origin blog.csdn.net/yang520java/article/details/103830835