Jmeter系列(5)- jmeter.properties常用配置项讲解

jmeter.properties

所在目录: E:\apache-jmeter-5.2.1\bin ,jmeter安装目录下的bin目录

是Jmeter核心配置项文件

官方建议

将需要修改的属性值,复制粘贴到同目录下的 user.properties 

好处:当Jmeter升级时,可以避免修改项需要重新应用

常用的配置

官方文档:Apache JMeter - User's Manual: Properties Reference

默认语言设置

  • language=en:默认英文
  • language=zh_CN:默认中文

注意:这个只有在 jmeter.properties 文件中声明才会生效,官方也提醒了

 

配置默认编码格式

  • sampleresult.default.encoding=ISO-8859-1:默认ISO-8859-1
  • sampleresult.default.encoding=UTF-8:可以改成常用的UTF-8

输出测试报告模板格式 

jmeter.save.saveservice.output_format=csv

捕捉cookie

Cookies应该存储为变量

CookieManager.save.cookies=false:默认

CookieManager.save.cookies=true:将cookie存储为变量

快捷方式(ctrl+数字0-9)

  • gui.quick_0=ThreadGroupGui
  • gui.quick_1=HttpTestSampleGui
  • gui.quick_2=RegexExtractorGui
  • gui.quick_3=AssertionGui
  • gui.quick_4=ConstantTimerGui
  • gui.quick_5=TestActionGui
  • gui.quick_6=JSR223PostProcessor
  • gui.quick_7=JSR223PreProcessor
  • gui.quick_8=DebugSampler
  • gui.quick_9=ViewResultsFullVisualizer

post请求,若不添加Content-Type,则不会默认添加Content-type

在5.0版本之前默认是true

post_add_content_type_if_missing=false:默认

post_add_content_type_if_missing=true:添加Content-Type: application/x-www-form-urlencoded

配置远程主机 host 

remote_hosts=127.0.0.1

后面有哪些会用到我再加上哦

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值