Jmeter---非GUI命令行的执行生成报告、使用ant插件执行接口测试脚本生成报告

非GUI命令行的执行

  1. 在jmx后缀的文件目录下打开命令行

  2. 运行:jmeter -n -t filename.jmx(-n : 非GUI的方式 -t: 指定需要执行的脚本)

生成jtl报告

运行:jmeter -n -t filename.jmx -l result_filename.jtl

生成html报告

运行:jmeter -n -t filename.jmx -l result_filename.jtl -e -o results

若报错,需要将全局配制文件 jmeter.properties 中的jmeter.save.saveservice.output_format=csv注释打开

使用ant插件执行接口测试脚本

(报告比较详细)

  1. 安装并解压:Apache Ant - Binary Distributions
  1. 配置系统path环境变量

eg: D:\apache-ant-1.10.14\bin

  1. 编辑 执行和构建的报告的文件:build.xml

  2. 配置 jmeter全局配置文件 jmeter.properties

jmeter.save.saveservice.output_format=xml

  1. 执行

输入 ant

相关推荐
软测进阶2 天前
【超详细图文教程】2025年最新 Jmeter 详细安装教程及接口测试示例
jmeter
kebeiovo6 天前
常用的几种测试工具:selenium,jmeter,jenkins
selenium·测试工具·jmeter
AIZHINAN7 天前
如何使用 JMeter 进行接口测试。
jmeter·接口测试
程序员小远7 天前
基于jmeter+perfmon的稳定性测试记录
自动化测试·软件测试·python·测试工具·jmeter·职场和发展·测试用例
文人sec7 天前
性能测试-jmeter9-直连数据库
数据库·测试工具·jmeter
IDOlaoluo7 天前
apache-jmeter-5.1.1安装部署与使用教程(小白一看就会)
jmeter·apache
文人sec9 天前
性能测试-jmeter7-元件提取器
python·jmeter·prometheus·模块测试
坚定信念,勇往无前11 天前
Jmeter元件的加载顺序
jmeter
明月与玄武15 天前
Docker化性能监控平台搭建:JMeter+InfluxDB+Grafana全攻略
jmeter·docker·grafana