macos安装jmeter测试软件
- java环境安装
a. 验证安装环境
java -version # 如果有版本信息,说明已安装
b. 安装jdk
# 安装 Homebrew(如未安装)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 安装 OpenJDK
brew install openjdk
b. 验证java
KGQ0J643R0:$ /usr/local/opt/openjdk@23/bin/java --version
openjdk 23.0.2 2025-01-21
OpenJDK Runtime Environment Homebrew (build 23.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 23.0.2, mixed mode, sharing)
-
下载jmeter
a. 下载地址:https://jmeter.apache.org/download_jmeter.cgi
b. 直接下载binary版本运行即可
-
运行jmeter
a. 启动程序
KGQ0J64345:$ /usr/local/opt/openjdk@23/bin/java -jar apache-jmeter-5.6.3/bin/ApacheJMeter.jar
WARN StatusConsoleListener The use of package scanning to locate plugins is deprecated and will be removed in a future release
================================================================================
Don't use GUI mode for load testing !, only for Test creation and Test debugging.
For load testing, use CLI Mode (was NON GUI):
jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
& increase Java Heap to meet your test requirements:
Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
Check : https://jmeter.apache.org/usermanual/best-practices.html
================================================================================
2025-02-18 11:42:16.175 java[7577:235081186] +[IMKClient subclass]: chose IMKClient_Modern
2025-02-18 11:42:16.175 java[7577:235081186] +[IMKInputSession subclass]: chose IMKInputSession_Modern
b. 切换为中文
点击顶部的 Options -> Choose Language → Chinese (Simplified)
c. 创建任务
创建线程组->添加HTTP请求->添加定时器