Merge remote-tracking branch 'origin/v1.8' into v1.8
This commit is contained in:
commit
dfc24d96a4
|
@ -17,7 +17,7 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<shiro.version>1.6.0</shiro.version>
|
<shiro.version>1.6.0</shiro.version>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<jmeter.version>5.2.1</jmeter.version>
|
<jmeter.version>5.4.1</jmeter.version>
|
||||||
<nacos.version>1.1.3</nacos.version>
|
<nacos.version>1.1.3</nacos.version>
|
||||||
<dubbo.version>2.7.8</dubbo.version>
|
<dubbo.version>2.7.8</dubbo.version>
|
||||||
<graalvm.version>20.1.0</graalvm.version>
|
<graalvm.version>20.1.0</graalvm.version>
|
||||||
|
|
|
@ -136,8 +136,10 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
||||||
try {
|
try {
|
||||||
HTTPSamplerProxy source = (HTTPSamplerProxy) key;
|
HTTPSamplerProxy source = (HTTPSamplerProxy) key;
|
||||||
BeanUtils.copyBean(samplerProxy, source);
|
BeanUtils.copyBean(samplerProxy, source);
|
||||||
|
samplerProxy.setRest(new ArrayList<KeyValue>(){{this.add(new KeyValue());}});
|
||||||
|
samplerProxy.setArguments(new ArrayList<KeyValue>(){{this.add(new KeyValue());}});
|
||||||
if (source != null && source.getHTTPFiles().length > 0) {
|
if (source != null && source.getHTTPFiles().length > 0) {
|
||||||
samplerProxy.getBody().setBinary(new ArrayList<>());
|
samplerProxy.getBody().initBinary();
|
||||||
samplerProxy.getBody().setType(Body.FORM_DATA);
|
samplerProxy.getBody().setType(Body.FORM_DATA);
|
||||||
List<KeyValue> keyValues = new LinkedList<>();
|
List<KeyValue> keyValues = new LinkedList<>();
|
||||||
for (HTTPFileArg arg : source.getHTTPFiles()) {
|
for (HTTPFileArg arg : source.getHTTPFiles()) {
|
||||||
|
@ -163,6 +165,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
||||||
source.getArguments().getArgumentsAsMap().forEach((k, v) -> {
|
source.getArguments().getArgumentsAsMap().forEach((k, v) -> {
|
||||||
samplerProxy.getBody().setRaw(v);
|
samplerProxy.getBody().setRaw(v);
|
||||||
});
|
});
|
||||||
|
samplerProxy.getBody().initKvs();
|
||||||
} else {
|
} else {
|
||||||
List<KeyValue> keyValues = new LinkedList<>();
|
List<KeyValue> keyValues = new LinkedList<>();
|
||||||
source.getArguments().getArgumentsAsMap().forEach((k, v) -> {
|
source.getArguments().getArgumentsAsMap().forEach((k, v) -> {
|
||||||
|
@ -173,6 +176,7 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
||||||
samplerProxy.setArguments(keyValues);
|
samplerProxy.setArguments(keyValues);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
samplerProxy.getBody().initBinary();
|
||||||
}
|
}
|
||||||
samplerProxy.setPath("");
|
samplerProxy.setPath("");
|
||||||
samplerProxy.setMethod(source.getMethod());
|
samplerProxy.setMethod(source.getMethod());
|
||||||
|
|
|
@ -65,15 +65,12 @@ public class Body {
|
||||||
sampler.setHTTPFiles(httpFileArgs(requestId));
|
sampler.setHTTPFiles(httpFileArgs(requestId));
|
||||||
sampler.setDoMultipart(true);
|
sampler.setDoMultipart(true);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (!this.isJson()) {
|
|
||||||
sampler.setPostBodyRaw(true);
|
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isNotEmpty(this.format) && "JSON-SCHEMA".equals(this.format) && this.getJsonSchema() != null) {
|
if (StringUtils.isNotEmpty(this.format) && "JSON-SCHEMA".equals(this.format) && this.getJsonSchema() != null) {
|
||||||
this.raw = JSONSchemaGenerator.getJson(com.alibaba.fastjson.JSON.toJSONString(this.getJsonSchema()));
|
this.raw = JSONSchemaGenerator.getJson(com.alibaba.fastjson.JSON.toJSONString(this.getJsonSchema()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
KeyValue keyValue = new KeyValue("", "JSON-SCHEMA", this.getRaw(), true, true);
|
KeyValue keyValue = new KeyValue("", "JSON-SCHEMA", this.getRaw(), true, true);
|
||||||
|
sampler.setPostBodyRaw(true);
|
||||||
keyValue.setEnable(true);
|
keyValue.setEnable(true);
|
||||||
keyValue.setEncode(false);
|
keyValue.setEncode(false);
|
||||||
body.add(keyValue);
|
body.add(keyValue);
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- api_scenario_report modify column length
|
||||||
|
ALTER TABLE api_scenario_report MODIFY COLUMN name VARCHAR(300);
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2115bd28a90854d2b6276a90878934715498c584
|
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
|
Loading…
Reference in New Issue