jmeter测试html报告,Jmeter生成html格式测试报告(示例代码)

使用jmeter进行性能测试,运行完毕后生成html格式的测试报告,需要进行如下操作:

1.在C:\apache-jmeter-3.0\bin文件夹下的user.properties文本中添加如下信息:

jmeter.save.saveservice.assertion_results_failure_message=true

jmeter.save.saveservice.response_code=true

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.bytes=true

jmeter.save.saveservice.thread_counts=true

jmeter.save.saveservice.timestamp_format=ms

jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS

# 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.

#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 series

jmeter.reportgenerator.exporter.html.filters_only_sample_series=true

2.运行jmeter程序,在命令行输入如下信息:

1)Windows系统

输入格式如下:jmeter.bat -n -t -l -e -o

实际输入:C:\apache-jmeter-3.0\bin\jmeter.bat -n -t Movie.jmx -l movie.jtl -e -o test

2)Linux系统

输入格式如下:jmeter -n -t -l -e -o

实际输入:/opt/apache-jmeter-3.0/bin/jmeter -n -t final-result.jmx -l final-result.jtl -e -o /opt/apache-jmeter-3.0/test

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值