标签:
JMeter3.0提供一个用于生成HTML页面格式图形化报告的扩展模块。该模块支持通过两种方式生成多维度图形化测试报告:
其默认提供的度量维度包括:
- Latency time = 接收到响应的第一个字节的时间点 - 请求开始发送的时间点
from just before sending the request to just after the first response has been received
-- Apache JMeter Glossary
- 响应时间(JMeter术语中的Elapsed time) = 接收完所有响应内容的时间点 - 请求开始发送的时间点
from just before sending the request to just after the last response has been received
-- Apache JMeter Glossary
jmeter.save.saveservice.data_type=true
jmeter.save.saveservice.label=true
jmeter.save.saveservice.response_code=true
# response_data is not currently supported for CSV output
jmeter.save.saveservice.response_data=true
# Save ResponseData for failed samples
jmeter.save.saveservice.response_data.on_error=false
jmeter.save.saveservice.response_message=true
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.thread_name=true
jmeter.save.saveservice.time=true
jmeter.save.saveservice.subresults=true
jmeter.save.saveservice.assertions=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.connect_time=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.responseHeaders=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.encoding=false
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.filename=true
jmeter.save.saveservice.hostname=true
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.sample_count=true
jmeter.save.saveservice.idle_time=true
# Timestamp format - this only affects CSV output files
# legitimate values: none, ms, or a format suitable for SimpleDateFormat
jmeter.save.saveservice.timestamp_format=ms
jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
jmeter.save.saveservice.assertion_results_failure_message = true
a. 在压力测试结束时报告
jmeter -n -t <test JMX file> -l <log file> -e -o <Path to output folder>
jmeter -n -t E:\apache-jmeter-3.0\script\test.jmx -l LogFile -e -o ./report
b. 使用已有的压力测试CSV日志文件生成报告
jmeter -g <log file> -o <Path to output folder>
jmeter -g E:\apache-jmeter-3.0\bin\LogFile -o ./report
两个样例都会在\apache-jmeter-3.0\bin\report目录下产生如下文件(夹):
用浏览器打开index.html文件,即可查看各种图形化报告:
注:在3.0版本,由于源码中字符编码的问题,可能会遇到生成的报告中,中文标签展示为乱码的问题
解决方案:修改JMeter report模块读取数据源码中的字符集设置为UTF-8,编译后替换到JMETER_HOME\lib\ext\ApacheJMeter_core.jar
下载链接:http://pan.baidu.com/s/1kVpsnNx
标签:
原文地址:http://www.cnblogs.com/Akubi/p/5946897.html