jmeter入门

jmeter入门示例

下载地址

一、GUI模式

创建http请求

结果断言
聚合报告

二、命令行模式

1.参数说明

执行./jmeter.bat -?,输入帮助信息

    _    ____   _    ____ _   _ _____       _ __  __ _____ _____ _____ ____
   / \  |  _ \ / \  / ___| | | | ____|     | |  \/  | ____|_   _| ____|  _ \
  / _ \ | |_) / _ \| |   | |_| |  _|    _  | | |\/| |  _|   | | |  _| | |_) |
 / ___ \|  __/ ___ \ |___|  _  | |___  | |_| | |  | | |___  | | | |___|  _ <
/_/   \_\_| /_/   \_\____|_| |_|_____|  \___/|_|  |_|_____| |_| |_____|_| \_\ 5.3

Copyright (c) 1999-2020 The Apache Software Foundation

        --?
                print command line options and exit
        -h, --help
                print usage information and exit
        -v, --version
                print the version information and exit
        -p, --propfile <argument>
                the jmeter property file to use
        -q, --addprop <argument>
                additional JMeter property file(s)
        -t, --testfile <argument>
                the jmeter test(.jmx) file to run. "-t LAST" will load last
                used file
        -l, --logfile <argument>
                the file to log samples to
        -i, --jmeterlogconf <argument>
                jmeter logging configuration file (log4j2.xml)
        -j, --jmeterlogfile <argument>
                jmeter run log file (jmeter.log)
        -n, --nongui
                run JMeter in nongui mode
        -s, --server
                run the JMeter server
        -E, --proxyScheme <argument>
                Set a proxy scheme to use for the proxy server
        -H, --proxyHost <argument>
                Set a proxy server for JMeter to use
        -P, --proxyPort <argument>
                Set proxy server port for JMeter to use
        -N, --nonProxyHosts <argument>
                Set nonproxy host list (e.g. *.apache.org|localhost)
        -u, --username <argument>
                Set username for proxy server that JMeter is to use
        -a, --password <argument>
                Set password for proxy server that JMeter is to use
        -J, --jmeterproperty <argument>=<value>
                Define additional JMeter properties
        -G, --globalproperty <argument>=<value>
                Define Global properties (sent to servers)
                e.g. -Gport=123
                 or -Gglobal.properties
        -D, --systemproperty <argument>=<value>
                Define additional system properties
        -S, --systemPropertyFile <argument>
                additional system property file(s)
        -f, --forceDeleteResultFile
                force delete existing results files and web report folder if
                 present before starting the test
        -L, --loglevel <argument>=<value>
                [category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com
                .example.foo=WARN
        -r, --runremote
                Start remote servers (as defined in remote_hosts)
        -R, --remotestart <argument>
                Start these remote servers (overrides remote_hosts)
        -d, --homedir <argument>
                the jmeter home directory to use
        -X, --remoteexit
                Exit the remote servers at end of test (non-GUI)
        -g, --reportonly <argument>
                generate report dashboard only, from a test results file
        -e, --reportatendofloadtests
                generate report dashboard after load test
        -o, --reportoutputfolder <argument>
                output folder for report dashboard

命令参数

2.生成日志文件并输入dashboard页面

..\bin\jmeter.bat -n -t .\json-test.jmx  -l report.jtl -e -o .\html

3.根据已有日志文件生成dashboard页面

..\bin\jmeter.bat -g .\report.jtl -o ./html

参考:
jmeter之命令行生成HTML报告(八)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

搬山境KL攻城狮

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值