-
Notifications
You must be signed in to change notification settings - Fork 288
FAQ
凝雨 edited this page Jul 18, 2018
·
29 revisions
修改jmeter.properties中的sampleresult.default.encoding
,文件位置:JMETER_HOME\bin\
#sampleresult.default.encoding=ISO-8859-1
改为
sampleresult.default.encoding=UTF-8
Modify sampleresult.default.encoding
in jmeter.properties, file location: JMETER_HOME\bin\
#sampleresult.default.encoding=ISO-8859-1
Change to
sampleresult.default.encoding=UTF-8
- paramType: 必须填写,基础类型名称 或 包装类完全名(含包名)
- paramValue: 填写
null
或NULL
或不填写值(空),不要填写""
(""
表示后端接收到双引号字符串并非空串),例如下图:
- paramType: 必须填写,类完全名(含包名)
- paramValue: 必须是合法的json格式数据,需要掌握json知识,比如说集合、数组、map这些使用什么json格式体现,json格式在线验证可以使用工具bejson
- paramValue: 填写
null
或NULL
或不填写值(空),不要填写""
(""
表示后端接收到双引号字符串并非空串) - paramValue: 填写
{}
表示new一个空对象所有属性都为空 - 如果只想给对象中的某几个属性传值其余属性不传值,参考下面示例:
- 示例:对象中分别有三个属性
attr1
、attr2
、attr3
- paramValue: 填写
{"attr1":"val1"}
表示对象中attr1
属性值为val1
,其余两个属性attr2
和attr3
的值均为null
- paramValue: 填写
- 示例:对象中分别有三个属性
- paramValue: 填写
{"attr1":"null"}
表示后端接收到非null
参数对象,对象中attr1
属性值是一个"null"
字符串,并不是null
引用 - paramValue: 填写
{"attr1":""}
表示后端接收到非null
参数对象,对象中attr1
属性值是一个空字符串 - paramValue: 填写
{"attr1":}
这是一个错误的json格式,表示后端接收到null
引用 - paramValue: 填写
[]
表示集合、数组类的参数
参数示例类
io.github.ningyu.MyClassVo
package io.github.ningyu;
import java.io.Serializable;
public class MyClassVo implements Serializable {
private static final long serialVersionUID = 2833248590539596892L;
private String name;
public void setName(String name) {
this.name= name;
}
public String getName() {
return name;
}
}
io.github.ningyu.RequestVo<T>
package io.github.ningyu;
import java.io.Serializable;
public class RequestVo<T> implements Serializable {
private static final long serialVersionUID = -5111447619170259174L;
private T items = null;
public RequestVo(T items) {
super();
this.items = items;
}
public T getItems() {
return items;
}
public void setItems(T items) {
this.items = items;
}
}
泛型参数示例
-
参数类型为:
io.github.ningyu.MyClassVo
- paramType:
io.github.ningyu.MyClassVo
- paramValue:
{"name":"123456"}
- paramType:
-
参数类型为:
io.github.ningyu.MyClassVo[]
- paramType:
io.github.ningyu.MyClassVo[]
- paramValue:
[{"name":"123456"}]
- paramType:
-
参数类型为:
io.github.ningyu.RequestVo<MyClassVo>
- paramType:
io.github.ningyu.RequestVo
- paramValue:
{"items": {"class": "io.github.ningyu.MyClassVo","name": "123456"}}
- paramType:
-
参数类型为:
io.github.ningyu.RequestVo<MyClassVo>[]
- paramType:
io.github.ningyu.RequestVo[]
- paramValue:
[{"items": {"class": "io.github.ningyu.MyClassVo","name": "123456"}}]
- paramType:
-
参数类型为:
java.util.List<MyClassVo>
- paramType:
java.util.List
- paramValue:
[{"class": "io.github.ningyu.MyClassVo","name":"123456"}]
- paramType:
-
参数类型为:
java.util.List<MyClassVo>[]
- paramType:
java.util.List[]
- paramValue:
[[{"class": "io.github.ningyu.MyClassVo","name":"123456"}]]
- paramType:
-
参数类型为:
java.util.Map<String, MyClassVo>
- paramType:
java.util.Map
- paramValue:
{"key":{"class": "io.github.ningyu.MyClassVo","name":"123456"}}
- paramType:
-
参数类型为:
java.util.Map<String, MyClassVo>[]
- paramType:
java.util.Map[]
- paramValue:
[{"key":{"class": "io.github.ningyu.MyClassVo","name":"123456"}}]
- paramType:
- Getting Started
- Communication
- Information