霍格沃兹测试开发学社



方式一:直接命令行进行参数值传递。
方式二:编写脚本进行参数值传递。{shell/python}
线程组 -> 添加 -> 配置元件 -> 用户定义的变量

定义3个变量和变量对应的默认值。
点击函数助手

使用__P函数生成对应属性,并复制。

使用__P函数生成对应属性,并复制。

添加三个函数,分别对应线程组的属性。

线程组的线程属性引用上面自定义的变量。

线程组(Thread Group) -> 添加(Add) -> 监听器(Listener) -> 聚合报告(Aggregate Report)


-J:jmeterproperty;定义额外的 JMeter 属性
jmeter -n -t [jmx file] -l [results file] -Jthread=整数 -Jloop=整数 -Jramp=整数
jmeter -n -t GETAPI.jmx -l get.jtl -Jthread=2 -Jloop=2 -Jramp=1

在低并发数区域内可以大增量,在高并发数区域内使用小增量。
10 50 100 120 140 150 160 170 175
具体的并发数值根据被测服务不同而不同

thread_num_array = (10 50 100 120 140)
PATH是否存在reportgenerator.properties文件保存关于图形化HTML报告生成模块的默认配置。
要变更报告相关配置信息,在user.properties中配置。
jmeter.reportgenerator.report_title=Apache JMeter Dashboard

user.properties文件最后进行配置的追加:jmeter.reportgenerator.report_title=ceshiren.com

#---------------------------------------------------------------------------
# Aggregate Report and Aggregate Graph - configuration
#---------------------------------------------------------------------------
#
# Percentiles to display in reports
# Can be float value between 0 and 100
# First percentile to display, defaults to 90%
#aggregate_rpt_pct1=90
# Second percentile to display, defaults to 95%
#aggregate_rpt_pct2=95
# Second percentile to display, defaults to 99%
#aggregate_rpt_pct3=99

user.properties文件最后进行配置的追加:
aggregate_rpt_pct2=70


| 问题 |
|---|
| 怎样进行web端的性能分析及优化? |
| 怎样搭建一套性能监控体系? |
| 了解SkyWalking吗? |
| 如果要做一个性能测试平台,有什么思路? |
| 微信小程序怎么进行性能分析? |