分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

jmeter3.0生成html格式的dashboard性能测试结果

发布时间:2023-09-06 01:15责任编辑:蔡小小关键词:暂无标签

jmeter3.0以上支持生成dashboard的html报告,官网介绍:https://jmeter.apache.org/usermanual/generating-dashboard.html

效果图:

具体配置如下:

1. 打开jmeter安装目录下的user.properties,增加如下配置

#---------------------------------------------------------------------------# Reporting configuration#---------------------------------------------------------------------------jmeter.save.saveservice.output_format=csvjmeter.save.saveservice.bytes = truejmeter.save.saveservice.label = truejmeter.save.saveservice.latency = truejmeter.save.saveservice.response_code = truejmeter.save.saveservice.response_message = truejmeter.save.saveservice.successful = truejmeter.save.saveservice.thread_counts = truejmeter.save.saveservice.thread_name = truejmeter.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 suitablejmeter.save.saveservice.timestamp_format = yyyy/MM/dd HH:mm:ssjmeter.save.saveservice.assertion_results_failure_message = true

2. user.properties再增加如下内容

# Configure this property to change the report title#jmeter.reportgenerator.report_title=Apache JMeter Dashboard# Change this parameter if you want to change the granularity of over time graphs.# Granularity must be higher than 1000 (1second) otherwise Throughput graphs will be incorrect# see Bug 60149#jmeter.reportgenerator.overall_granularity=60000 Change this parameter if you want to change the granularity of Response time distribution# Set to 500 ms by default#jmeter.reportgenerator.graph.responseTimeDistribution.property.set_granularity=500# Change this parameter if you want to override the APDEX satisfaction threshold.jmeter.reportgenerator.apdex_satisfied_threshold=1500# Change this parameter if you want to override the APDEX tolerance threshold.jmeter.reportgenerator.apdex_tolerated_threshold=3000# Sets the destination directory for generated html pages, it is better to change it for every generation# This will override the value set through -o command line option# jmeter.reportgenerator.exporter.html.property.output_dir=/tmp/test-report# Indicates which graph series are filtered (regular expression)# In the below example we filter on Search and Order samples# Note that the end of the pattern should always include (-success|-failure)?$# Transactions per second suffixes Transactions with "-success" or "-failure" depending # on the result#jmeter.reportgenerator.exporter.html.series_filter=^(Search|Order)(-success|-failure)?$# Indicates whether series filter apply only on sample seriesjmeter.reportgenerator.exporter.html.filters_only_sample_series=true

3. 压力测试后生成报告的命令格式:

jmeter -n -t <test JMX file> -l <test log file> -e -o <Path to output folder>

例如:

jmeter -n -t D:\work\性能\scrip\test1.jmx -l D:\work\性能\scrip\rp/testLogFile.jtl -e -o D:\work\性能\scrip\rp/output

4. 对已存在的日志文件生成报告的命令格式:

jmeter -g <log file> -o <Path to output folder>

例如:

jmeter -g D:\work\性能\scrip\rp/testLogFile.jtl -o D:\work\性能\scrip\rp/output

5. 到相应目录下查看,打开index.html,就可以看到response time 和tps等性能指标了

jmeter3.0生成html格式的dashboard性能测试结果

原文地址:http://www.cnblogs.com/qiaoyeye/p/7611535.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved