fix(UI 自动化): 修复测试计划导出报告报错

This commit is contained in:
zhangdahai112 2022-08-25 18:37:39 +08:00 committed by zhangdahai112
parent 3b3544aa2f
commit 482165ccf7
1 changed files with 5 additions and 1 deletions

View File

@ -1604,7 +1604,11 @@ public class TestPlanService {
if (resultMap.get(item.getReportId()) != null && if (resultMap.get(item.getReportId()) != null &&
StringUtils.isNotBlank(resultMap.get(item.getReportId()).getContent())) { StringUtils.isNotBlank(resultMap.get(item.getReportId()).getContent())) {
ApiDefinitionExecResultWithBLOBs execResult = resultMap.get(item.getReportId()); ApiDefinitionExecResultWithBLOBs execResult = resultMap.get(item.getReportId());
JSONObject responseObj = JSONObject.parseObject(execResult.getContent()); JSONObject responseObj = new JSONObject();
try {
responseObj = JSONObject.parseObject(execResult.getContent());
} catch (Exception e) {
}
if (StringUtils.isNotEmpty(execResult.getEnvConfig())) { if (StringUtils.isNotEmpty(execResult.getEnvConfig())) {
responseObj.put("envName", apiDefinitionService.getEnvNameByEnvConfig(execResult.getProjectId(), execResult.getEnvConfig())); responseObj.put("envName", apiDefinitionService.getEnvNameByEnvConfig(execResult.getProjectId(), execResult.getEnvConfig()));
} }