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