提交 9f2d0187 编写于 作者: F fit2-zhao 提交者: fit2-zhao

fix(接口自动化): 导入jmx 初始化body内容

上级 a9c53afa
......@@ -198,6 +198,12 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
samplerProxy.setArguments(new ArrayList<KeyValue>() {{
this.add(new KeyValue());
}});
// 初始化body
Body body = new Body();
body.init();
body.initKvs();
body.initBinary();
samplerProxy.setBody(body);
if (source != null && source.getHTTPFiles().length > 0) {
samplerProxy.getBody().initBinary();
samplerProxy.getBody().setType(Body.FORM_DATA);
......
......@@ -116,6 +116,12 @@ public class Body {
return StringUtils.equals(type, XML);
}
public void init() {
this.type = "";
this.raw = "";
this.format = "";
}
public void initKvs() {
this.kvs = new ArrayList<>();
this.kvs.add(new KeyValue());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册