fix(测试跟踪): 修复测试计划点击未执行的case报错的缺陷 (#15998)
--bug=1015053 --user=王孝刚 【测试跟踪】测试计划-执行测试计划时选择失败重试&失败停止-报告中点击接口case中未执行的用例报500error https://www.tapd.cn/55049933/s/1205319 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
8964dec435
commit
4472c320bd
|
@ -1498,13 +1498,17 @@ public class ApiDefinitionService {
|
|||
}
|
||||
APIReportResult reportResult = new APIReportResult();
|
||||
reportResult.setStatus(result.getStatus());
|
||||
if (StringUtils.isNotEmpty(result.getEnvConfig())) {
|
||||
String contentStr = result.getContent();
|
||||
try {
|
||||
JSONObject content = JSONObject.parseObject(result.getContent());
|
||||
if (StringUtils.isNotEmpty(result.getEnvConfig())) {
|
||||
content.put("envName", this.getEnvNameByEnvConfig(result.getProjectId(), result.getEnvConfig()));
|
||||
reportResult.setContent(content.toJSONString());
|
||||
} else {
|
||||
reportResult.setContent(result.getContent());
|
||||
}
|
||||
contentStr = content.toString();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("解析content失败!", e);
|
||||
}
|
||||
reportResult.setContent(contentStr);
|
||||
return reportResult;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue