简体   繁体   English

如何执行多个 Jmeter 脚本并为这些脚本生成 html 报告

[英]How to execute multiple Jmeter scripts and generate html report for those scripts

I have multiple jmeter scripts like Test1.jmx,Test2.jmx,Test3.jmx and those scripts should be run sequentially and need to result file as HTML report.我有多个 jmeter 脚本,如 Test1.jmx、Test2.jmx、Test3.jmx,这些脚本应该按顺序运行,并且需要将结果文件作为 HTML 报告。 And I had executed sequentially via bat but reports were generated individually(3reports) I need single HTML report file for whole execution.我已经通过 bat 顺序执行,但报告是单独生成的(3个报告)我需要单个 HTML 报告文件来执行整个过程。

The options are in:选项在:

  1. Execute your tests providing the same .jtl results file via -l command line argument通过-l命令行参数执行提供相同.jtl 结果文件的测试

    jmeter -n -t test1.jmx -l result.jtl jmeter -n -t test2.jmx -l result.jtl jmeter -n -t test3.jmx -l result.jtl

    as long as you don't use -f argument the result file will be appended.只要您不使用-f参数,就会附加结果文件。

    More information: Full list of command-line options更多信息: 命令行选项的完整列表

  2. Use Merge Results tool (can be installed using JMeter Plugins Manager )使用Merge Results 工具(可以使用JMeter Plugins Manager安装)

You could extend option 1 in answer#1 to generate the HTML dashboard report at the end of the test execution您可以在 answer#1 中扩展选项 1 以在测试执行结束时生成HTML 仪表板报告

./jmeter.sh -n -t TestPlan-1.jmx -f -l test-results-sample.csv
./jmeter.sh -n -t TestPlan-2.jmx -l test-results-sample.csv
./jmeter.sh -n -t TestPlan-3.jmx -l test-results-sample.csv
./jmeter.sh -g test-results-sample.csv -f -o test_reports

Commanline options:命令行选项:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM