wget https://mirror.cogentco.com/pub/apache//jmeter/binaries/apache-jmeter-5.4.1.tgz
tar -zxvf apache-jmeter-5.4.1.tgz -C /opt
Add bin directory to PATH
把执行目录加入 PATH
export PATH="$PATH:/opt/apache-jmeter-5.4.1/bin"
Add the following variable to environment, and change the specific value
将以下变量加入环境,并更改特定值
export LOCAL_HOST=127.0.0.1
export LOCAL_PORT=80
export LOCAL_USERNAME=USERNAME
export LOCAL_PASSWORD=PASSWORD
export TESTING_HOST=192.168.1.10
export TESTING_PORT=80
export TESTING_USERNAME=USERNAME
export TESTING_PASSWORD=PASSWORD
export PRODUCT_HOST=192.168.1.100
export PRODUCT_PORT=80
export PRODUCT_USERNAME=USERNAME
export PRODUCT_PASSWORD=PASSWORD
jmeter
Click Open
in the drop down box of menu File
, Select test.jmx
, and adjust as needed
点击菜单 File 的下拉框中的 Open,选择 test.jmx,并根据需要调整
./test.sh
./test.sh testing
./test.sh product