fix(接口测试): 修复接口测试发送通知部分变量不能获取的问题

--bug=1010048 --user=刘瑞斌 【消息通知】-接口自动化定时任务-的任务通知一些参数获取不到值 https://www.tapd.cn/55049933/s/1101037
This commit is contained in:
CaptainB 2022-01-30 19:54:07 +08:00 committed by 刘瑞斌
parent 72770c7e0f
commit 18145c01d0
1 changed files with 2 additions and 0 deletions

View File

@ -194,12 +194,14 @@ public class TestResultService {
if (StringUtils.equals("error", report.getStatus())) { if (StringUtils.equals("error", report.getStatus())) {
event = NoticeConstants.Event.EXECUTE_FAILED; event = NoticeConstants.Event.EXECUTE_FAILED;
} }
ApiScenarioWithBLOBs scenario = apiScenarioMapper.selectByPrimaryKey(testId);
Map paramMap = new HashMap<>(); Map paramMap = new HashMap<>();
paramMap.put("type", "api"); paramMap.put("type", "api");
paramMap.put("url", baseSystemConfigDTO.getUrl()); paramMap.put("url", baseSystemConfigDTO.getUrl());
paramMap.put("reportUrl", reportUrl); paramMap.put("reportUrl", reportUrl);
paramMap.put("operator", report.getExecutor()); paramMap.put("operator", report.getExecutor());
paramMap.putAll(new BeanMap(report)); paramMap.putAll(new BeanMap(report));
paramMap.putAll(new BeanMap(scenario));
NoticeModel noticeModel = NoticeModel.builder() NoticeModel noticeModel = NoticeModel.builder()
.operator(report.getUserId()) .operator(report.getUserId())
.successContext(successContext) .successContext(successContext)