fix:测试执行状态修改

This commit is contained in:
wenyann 2020-12-24 12:51:33 +08:00
parent 0b68685e0d
commit e2f272f601
3 changed files with 7 additions and 2 deletions

View File

@ -196,9 +196,11 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
} }
} }
try { try {
if (StringUtils.equals(NoticeConstants.Mode.API, report.getTriggerMode()) || StringUtils.equals(NoticeConstants.Mode.SCHEDULE, report.getTriggerMode())) {
sendTask(report, testResult); sendTask(report, testResult);
}
} catch (Exception e) { } catch (Exception e) {
LogUtil.error(e.getMessage(), e); LogUtil.error("发送通知" + e.getMessage(), e);
} }
} }
@ -237,6 +239,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
paramMap.put("id", report.getId()); paramMap.put("id", report.getId());
paramMap.put("type", "performance"); paramMap.put("type", "performance");
paramMap.put("url", baseSystemConfigDTO.getUrl()); paramMap.put("url", baseSystemConfigDTO.getUrl());
paramMap.put("state", report.getStatus());
NoticeModel noticeModel = NoticeModel.builder() NoticeModel noticeModel = NoticeModel.builder()
.successContext(successContext) .successContext(successContext)
.successMailTemplate("ApiSuccessfulNotification") .successMailTemplate("ApiSuccessfulNotification")

View File

@ -16,6 +16,7 @@ public class NoticeModel {
/** /**
* 保存状态 * 保存状态
*/ */
private String state;
private String status; private String status;
/** /**
* Event * Event

View File

@ -87,6 +87,7 @@ public class PerformanceNoticeTask {
paramMap.put("testName", loadTestReport.getName()); paramMap.put("testName", loadTestReport.getName());
paramMap.put("id", loadTestReport.getId()); paramMap.put("id", loadTestReport.getId());
paramMap.put("type", "performance"); paramMap.put("type", "performance");
paramMap.put("state", loadTestReport.getStatus());
paramMap.put("url", baseSystemConfigDTO.getUrl()); paramMap.put("url", baseSystemConfigDTO.getUrl());
NoticeModel noticeModel = NoticeModel.builder() NoticeModel noticeModel = NoticeModel.builder()
.successContext(successContext) .successContext(successContext)