fix(接口测试): 修复接口ms文件导入格式错误问题
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018235 --user=郭雨琦
This commit is contained in:
parent
617f3979f3
commit
911e49fb8e
|
@ -13,6 +13,7 @@ import io.metersphere.api.dto.automation.ReferenceDTO;
|
|||
import io.metersphere.api.dto.automation.TcpTreeTableDataStruct;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.*;
|
||||
import io.metersphere.api.dto.definition.request.ElementUtil;
|
||||
import io.metersphere.api.dto.definition.request.assertions.document.DocumentElement;
|
||||
import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
|
||||
import io.metersphere.api.dto.definition.request.sampler.MsJDBCSampler;
|
||||
|
@ -1442,7 +1443,9 @@ public class ApiDefinitionService {
|
|||
|
||||
private boolean setImportHashTree(ApiDefinitionWithBLOBs apiDefinition) {
|
||||
String request = apiDefinition.getRequest();
|
||||
MsHTTPSamplerProxy msHTTPSamplerProxy = JSONUtil.parseObject(request, MsHTTPSamplerProxy.class);
|
||||
JSONObject jsonObject = JSONUtil.parseObject(request);
|
||||
ElementUtil.dataFormatting(jsonObject);
|
||||
MsHTTPSamplerProxy msHTTPSamplerProxy = JSONUtil.parseObject(jsonObject.toString(), MsHTTPSamplerProxy.class);
|
||||
boolean createCase = CollectionUtils.isNotEmpty(msHTTPSamplerProxy.getHeaders());
|
||||
if (CollectionUtils.isNotEmpty(msHTTPSamplerProxy.getArguments()) && !createCase) {
|
||||
createCase = true;
|
||||
|
|
Loading…
Reference in New Issue