zoukankan      html  css  js  c++  java
  • JMeter3.2生成图形化HTML报告

      JMeter3.0引入了Dashboard Report,用于生成HTML页面格式图形化报告的扩展模块。

    该模块支持通过两种方式生成多维度图形化测试报告:

    1. 在JMeter性能测试结束时,自动生成本次测试的HTML图形化报告
    2. 使用一个已有的结果文件(如CSV文件)来生成对应结果的HTML图形化报告

      但是3.0直接生成报告会出现乱码,建议下载3.1之后的版本,我这里下载的是最新的3.2。

    如何生成报告?

      从cmd进入执行测试文件,

    • 基本命令格式:
      jmeter -n -t <test JMX file> -l <test log file> -e -o <Path to output folder>
    • 示例:

    执行完成后会在apache-jmeter-3.2inoutput目录下产生如下文件(夹):

    打开index.html文件,就可以查看各种图形化报告:

    如果需要从已有的结果文件CSV生成html报告,则需要配置jmeter.properties:

    jmeter.save.saveservice.bytes = true
    # Only available with HttpClient4
    #jmeter.save.saveservice.sent_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
    jmeter.save.saveservice.connect_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

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

    • jmeter.save.saveservice.assertion_results_failure_message = true
    • 如果使用了事务控制器(Transaction Controller),确认Generate parent sample为未勾选状态

     使用已有的CSV日志文件生成报告

      • 基本命令格式:
        jmeter -g <log file> -o <Path to output folder>
      • 示例:

    更多资料,请查看官方Dashboard Report说明...

    信用*创新*价值
    作者:大道QA团队*大东哥
    版权所有,转载请注明出处:http://www.cnblogs.com/greattao
  • 相关阅读:
    在网页中象GMAIL一样检测客户端是否连接到网络
    How to adjust IFrame height on it's content (转载)
    asp.net工程中aspx文件与codebehind文件的关联问题
    一个在VC中调用web service的方法
    往mssql 表的自增长字段中添加值
    iis7上安装php5+mysql
    试用淘宝开放平台
    关于IOCP的方方面面
    Overlapped I/O
    为什么需要allocator的rebind接口
  • 原文地址:https://www.cnblogs.com/greattao/p/6813156.html
Copyright © 2011-2022 走看看