12 - Jmeter系列-7-jmeter.properties常用配置项讲解

一、修改属性值:
官方建议:将需要修改的属性值复制粘贴到同目录下的user.properties
好处:当Jmeter升级时,可以避免修改项重新应用
二、常用的配置:
官方文档: https://jmeter.apache.org/usermanual/properties_reference.html#language


1、默认语言设置
- language=en:默认英文
- language=zh_CN:默认中文
注意:这个只有在 jmeter.properties 文件中声明才会生效,官方也提醒了
2、配置默认编码格式
- sampleresult.default.encoding=ISO-8859-1:默认ISO-8859-1
- sampleresult.default.encoding=UTF-8:可以改成常用的UTF-8
3、输出测试报告模板格式
jmeter.save.saveservice.output_format=csv
4、捕捉cookie
Cookies应该存储为变量
CookieManager.save.cookies=false:默认
CookieManager.save.cookies=true:将cookie存储为变量
5、快捷方式(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
6、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
7、配置远程主机 host
remote_hosts=127.0.0.1

浙公网安备 33010602011771号