fix(测试跟踪): 修复测试计划批量执行报告查看异常问题

--bug=1020420 --user=赵勇 【测试跟踪】测试计划-批量执行两个测试计划-报告runing 状态打开报告提示错误 https://www.tapd.cn/55049933/s/1307692
This commit is contained in:
fit2-zhao 2022-11-29 16:31:06 +08:00
parent ee67624c4c
commit b0f88c1a9a
2 changed files with 7 additions and 7 deletions

View File

@ -104,18 +104,19 @@ 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) {
if (element.getHashTree() != null) {
element.getHashTree().clear();
}
element.setEnable(true);
apiDefinitionWithBLOBs.setRequest(JSON.toJSONString(element));
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);
if (element.getHashTree() != null) {
element.getHashTree().clear();
}
apiDefinitionWithBLOBs.setRequest(JSON.toJSONString(element));
definitions.add(apiDefinitionWithBLOBs);
} }
} }
apiImport.setData(definitions); apiImport.setData(definitions);

View File

@ -2280,7 +2280,6 @@ public class TestPlanService {
RunModeConfigDTO runModeConfigDTO = JSON.parseObject(testPlan.getRunModeConfig(), RunModeConfigDTO.class); RunModeConfigDTO runModeConfigDTO = JSON.parseObject(testPlan.getRunModeConfig(), RunModeConfigDTO.class);
runModeConfigDTO = ObjectUtils.isEmpty(runModeConfigDTO) ? new RunModeConfigDTO() : runModeConfigDTO; runModeConfigDTO = ObjectUtils.isEmpty(runModeConfigDTO) ? new RunModeConfigDTO() : runModeConfigDTO;
jMeterService.verifyPool(testPlan.getProjectId(), runModeConfigDTO); jMeterService.verifyPool(testPlan.getProjectId(), runModeConfigDTO);
testPlan.setRunModeConfig(JSON.toJSONString(runModeConfigDTO));
String planReportId = UUID.randomUUID().toString(); String planReportId = UUID.randomUUID().toString();
//创建测试报告 //创建测试报告