Jmeter:测试后生成HTML报告 [英] Jmeter: HTML report generation after tests

查看:3349
本文介绍了Jmeter:测试后生成HTML报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些是我生成报告所遵循的步骤:

These are the steps that I followed to generate reports:

  1. 我有.jtl文件
  2. 我将给出示例配置的粘贴复制到我的user.properties位于apache-jmeter-5.0\bin
  3. 的文件
  4. 我使用CMDRunner.jar

  1. I have the .jtl file
  2. I copy paste given sample configuration to my user.properties file located at apache-jmeter-5.0\bin
  3. I convert .jtl to aggregate report using CMDRunner.jar

java -jar CMDRunner.jar --tool Reporter --generate-csv Demo17Results.csv --input-jtl Demo17Results.jtl --plugin-type AggregateReport

  • 将步骤3中获取的csv文件转换为HTML报告

  • Convert csv file got from step#3 to HTML reports

    我尝试了(1) jmeter -g Demo17Results.csv -o htmlReports/

    Error: csv' does not contain the field names header, ensure the jmeter.save.saveservice.* properties are the same as when the CSV file was created or the file may be read incorrectly when generating report An error occurred: Mismatch between expected number of columns:17 and columns in CSV file:11, check your jmeter.save.saveservice.* configuration or check line is complete

    Error: csv' does not contain the field names header, ensure the jmeter.save.saveservice.* properties are the same as when the CSV file was created or the file may be read incorrectly when generating report An error occurred: Mismatch between expected number of columns:17 and columns in CSV file:11, check your jmeter.save.saveservice.* configuration or check line is complete

    我尝试了(2) jmeter -n -t Demo17Run.jmx -l Demo17Results.csv -e -o htmlReports/

    Creating summariser <summary> Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:Demo17Results.csv is not empty

    Creating summariser <summary> Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:Demo17Results.csv is not empty

    清空csv文件后

    Creating summariser <summary> Created the tree successfully using Demo17Run.jmx Starting the test Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445 summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%) Tidying up ... Error generating the report: org.apache.jmeter.report.core.SampleException: Could not read metadata ! ... end of run

    Creating summariser <summary> Created the tree successfully using Demo17Run.jmx Starting the test Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445 summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%) Tidying up ... Error generating the report: org.apache.jmeter.report.core.SampleException: Could not read metadata ! ... end of run

    生成Jmeter HTML仪表板报告时我做错了什么?

    What am I doing wrong to generate Jmeter HTML dashboard reports?

    推荐答案

    1. 您不需要步骤2,JMeter的默认配置就可以用于仪表板生成
    2. 您不需要执行第3步,就需要从Demo17Results.jtl文件创建仪表板,该文件包含完整的原始结果,而不是统计信息表
    3. 尝试使用强制删除通过-f参数的上一个结果文件:

    1. You don't need step 2, JMeter default configuration is just fine for dashboard generation
    2. You don't need step 3, the dashboard needs to be created from the Demo17Results.jtl file which contains full raw results, not statistics table
    3. Try re-running your test scenario with forcing deletion of the previous result file via -f argument:

    jmeter -n -f -t Demo17Run.jmx -l Demo17Results.jtl -e -o htmlReports/
    

  • 如果没有任何帮助再次检查您是否尚未修改必需的结果文件配置设置提高report.dashboard软件包的JMeter日志详细程度通过将下一行添加到 log4j2.xml 文件中:

    If nothing helps double check you have not modified required results file configuration settings and increase JMeter logs verbosity for report.dashboard package by adding the next line to log4j2.xml file:

    <Logger name="org.apache.jmeter.report.dashboard" level="debug" />
    

    这篇关于Jmeter:测试后生成HTML报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆