jmeter学习笔记(一)-jmeter html测试报告

最近开始尝试用jmeter进行接口测试、性能测试,总结一下最近学习的成果。

下载了新版本的jmeter后,jmeter可以生成html测试报告,查看测试报告变得快捷方便。

生成html测试报告步骤很简单:

1、在jmeter.properties中确认配置:

jmeter.save.saveservice.bytes = true
jmeter.save.saveservice.label = true
jmeter.save.saveservice.latency = true
jmeter.save.saveservice.response_code = true
jmeter.save.saveservice.response_message = true
jmeter.save.saveservice.successful = true
jmeter.save.saveservice.thread_counts = true
jmeter.save.saveservice.thread_name = true
jmeter.save.saveservice.time = true
# the timestamp format must include the time and should include the date.
# For example the default, which is milliseconds since the epoch: 
jmeter.save.saveservice.timestamp_format = ms
# Or the following would also be suitable
jmeter.save.saveservice.timestamp_format = yyyy/MM/dd HH:mm:ss

2、如果希望在Errors报告中展示更详细数据,需要确保如下配置

jmeter.save.saveservice.assertion_results_failure_message = true

3、打开cmd命令行,切换路径至:jmeter安装路径/bin,输入命令行:

jmeter -n -t  -l  -e -o 
为测试的jmx文件;

为测试产生的log文件;

自定义存储测试报告的路径

例子:

jmeter -n -t F:\test.jmx -l 测试报告 -e -o E:\output





你可能感兴趣的:(jmeter)