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

相关推荐
zuozewei1 天前
JMeter vs Claude Code:从“约束系统“到“解放系统“的工程设计范式跃迁
jmeter
yiwenrong1 天前
解决 JMeter 端口(Address already in use: connect)耗尽问题
jmeter
美好的事情能不能发生在我身上2 天前
Jmeter压测遇到的问题
java·分布式·jmeter
aka卡卡4 天前
JMeter学习教程
jmeter
xiufeia5 天前
JMeter
java·jmeter·tomcat·高并发
文人sec6 天前
【Linux 服务器上搭建 JMeter 性能测试与监控环境(实战版)】
linux·运维·服务器·jmeter·性能测试
测试19986 天前
Jmeter接口测试:使用教程(上)
自动化测试·python·测试工具·jmeter·职场和发展·测试用例·接口测试
半个俗人9 天前
05postman关联-常用的数据提取方式
测试工具·jmeter·postman·js