fix(接口测试): 导入jmeter格式接口定义后带有多余步骤
--bug=1009808 --user=lyh 【接口测试】接口定义,导入jmeter格式接口定义,看不到用例 https://www.tapd.cn/55049933/s/1097297
This commit is contained in:
parent
92701822ea
commit
c0d70697dc
|
@ -104,13 +104,16 @@ public class JmeterDefinitionParser extends ApiImportAbstractParser<ApiDefinitio
|
||||||
for (MsTestElement element : results) {
|
for (MsTestElement element : results) {
|
||||||
ApiDefinitionWithBLOBs apiDefinitionWithBLOBs = buildApiDefinition(element);
|
ApiDefinitionWithBLOBs apiDefinitionWithBLOBs = buildApiDefinition(element);
|
||||||
if (apiDefinitionWithBLOBs != null) {
|
if (apiDefinitionWithBLOBs != null) {
|
||||||
definitions.add(apiDefinitionWithBLOBs);
|
|
||||||
ApiTestCaseWithBLOBs apiTestCase = new ApiTestCaseWithBLOBs();
|
ApiTestCaseWithBLOBs apiTestCase = new ApiTestCaseWithBLOBs();
|
||||||
BeanUtils.copyBean(apiTestCase, apiDefinitionWithBLOBs);
|
BeanUtils.copyBean(apiTestCase, apiDefinitionWithBLOBs);
|
||||||
apiTestCase.setApiDefinitionId(apiDefinitionWithBLOBs.getId());
|
apiTestCase.setApiDefinitionId(apiDefinitionWithBLOBs.getId());
|
||||||
apiTestCase.setStatus("Prepare");
|
apiTestCase.setStatus("Prepare");
|
||||||
apiTestCase.setPriority("P0");
|
apiTestCase.setPriority("P0");
|
||||||
definitionCases.add(apiTestCase);
|
definitionCases.add(apiTestCase);
|
||||||
|
|
||||||
|
element.getHashTree().clear();
|
||||||
|
apiDefinitionWithBLOBs.setRequest(JSON.toJSONString(element));
|
||||||
|
definitions.add(apiDefinitionWithBLOBs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apiImport.setData(definitions);
|
apiImport.setData(definitions);
|
||||||
|
|
Loading…
Reference in New Issue