Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.48 KB

2.jmeter.md

File metadata and controls

52 lines (40 loc) · 1.48 KB

jmeter

安装 Performance 插件

下载安装 jmeter

修改 /bin/user.properties

jmeter.save.saveservice.output_format=xml

配置 jmeter 测试

UI 配置

  • 运行 jmeter.bat
  • 配置测试计划
    • File --> New
    • Add --> Thread(Users) --> Thread Group
      • Number of Threads (users)
      • Loop Count
      • Add --> Sampler --> HTTP Request
        • Server Name or IP
        • Path
    • Add-- > Listener --> View results in table

命令行运行

jmeter.bat -j jmeter.save.saveservice.output_format=xml -n -t test.jmx -l test.report.jtl

jenkins 配置 jmeter 测试计划

  • New Item --> freestyle project --> Add build step --> Execute Windows batch command
    C:\apache-jmeter-5.6.2\bin\jmeter.bat -j jmeter.save.saveservice.output_format=xml -n -t C:\apache-jmeter-5.6.2\bin\test.jmx -l C:\apache-jmeter-5.6.2\bin\test.report.jtl
  • Add post-build --> Publish Performance test result report
    C:\apache-jmeter-5.6.2\bin\test.report.jtl