fix(接口自动化): 修复http 协议输入参数无名称 校验
This commit is contained in:
parent
3bb9d4c8f1
commit
cfa70bb622
|
@ -265,7 +265,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
private Arguments httpArguments(List<KeyValue> list) {
|
||||
Arguments arguments = new Arguments();
|
||||
list.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue -> {
|
||||
HTTPArgument httpArgument = new HTTPArgument(keyValue.getName(), keyValue.getValue() != null && keyValue.getValue().startsWith("@") ? ScriptEngineUtils.calculate(keyValue.getValue()) : keyValue.getValue());
|
||||
HTTPArgument httpArgument = new HTTPArgument(keyValue.getName(), StringUtils.isNotEmpty(keyValue.getValue()) && keyValue.getValue().startsWith("@") ? ScriptEngineUtils.calculate(keyValue.getValue()) : keyValue.getValue());
|
||||
httpArgument.setAlwaysEncoded(keyValue.isEncode());
|
||||
if (StringUtils.isNotBlank(keyValue.getContentType())) {
|
||||
httpArgument.setContentType(keyValue.getContentType());
|
||||
|
|
|
@ -49,7 +49,7 @@ public class KeyValue {
|
|||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return (StringUtils.isNotBlank(name) || StringUtils.isNotBlank(value)) && !StringUtils.equalsIgnoreCase(type, "file");
|
||||
return (StringUtils.isNotBlank(name) && StringUtils.isNotBlank(value)) && !StringUtils.equalsIgnoreCase(type, "file");
|
||||
}
|
||||
|
||||
public boolean isFile() {
|
||||
|
|
Loading…
Reference in New Issue