refactor(消息通知): 统一发送邮件时的标题为中文
This commit is contained in:
parent
08c07dec13
commit
de939eb79f
|
@ -217,10 +217,10 @@ public class TestResultService {
|
||||||
String failedContext = "${operator}执行接口自动化失败: ${name}" + ", 报告: ${reportUrl}";
|
String failedContext = "${operator}执行接口自动化失败: ${name}" + ", 报告: ${reportUrl}";
|
||||||
|
|
||||||
if (StringUtils.equals(ReportTriggerMode.API.name(), report.getTriggerMode())) {
|
if (StringUtils.equals(ReportTriggerMode.API.name(), report.getTriggerMode())) {
|
||||||
subject = Translator.get("task_notification_jenkins");
|
subject = "Jenkins任务通知";
|
||||||
}
|
}
|
||||||
if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), report.getTriggerMode())) {
|
if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), report.getTriggerMode())) {
|
||||||
subject = Translator.get("task_notification");
|
subject = "任务通知";
|
||||||
}
|
}
|
||||||
if (StringUtils.equalsIgnoreCase(ApiReportStatus.SUCCESS.name(), report.getStatus())) {
|
if (StringUtils.equalsIgnoreCase(ApiReportStatus.SUCCESS.name(), report.getStatus())) {
|
||||||
event = NoticeConstants.Event.EXECUTE_SUCCESSFUL;
|
event = NoticeConstants.Event.EXECUTE_SUCCESSFUL;
|
||||||
|
|
|
@ -47,10 +47,10 @@ public class PerformanceNoticeEvent implements LoadTestFinishEvent {
|
||||||
String successContext = "${operator}执行性能测试成功: ${name}, 报告: ${reportUrl}";
|
String successContext = "${operator}执行性能测试成功: ${name}, 报告: ${reportUrl}";
|
||||||
String failedContext = "${operator}执行性能测试失败: ${name}, 报告: ${reportUrl}";
|
String failedContext = "${operator}执行性能测试失败: ${name}, 报告: ${reportUrl}";
|
||||||
if (StringUtils.equals(ReportTriggerMode.API.name(), loadTestReport.getTriggerMode())) {
|
if (StringUtils.equals(ReportTriggerMode.API.name(), loadTestReport.getTriggerMode())) {
|
||||||
subject = Translator.get("task_notification_jenkins");
|
subject = "Jenkins任务通知";
|
||||||
}
|
}
|
||||||
if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), loadTestReport.getTriggerMode())) {
|
if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), loadTestReport.getTriggerMode())) {
|
||||||
subject = Translator.get("task_notification");
|
subject = "任务通知";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PerformanceTestStatus.Completed.name().equals(loadTestReport.getStatus())) {
|
if (PerformanceTestStatus.Completed.name().equals(loadTestReport.getStatus())) {
|
||||||
|
|
|
@ -128,9 +128,9 @@ public class TestPlanMessageService {
|
||||||
String failedContext = "${operator}执行的 ${name} 测试计划运行失败, 报告: ${planShareUrl}";
|
String failedContext = "${operator}执行的 ${name} 测试计划运行失败, 报告: ${planShareUrl}";
|
||||||
String context = "${operator}完成了测试计划: ${name}, 报告: ${planShareUrl}";
|
String context = "${operator}完成了测试计划: ${name}, 报告: ${planShareUrl}";
|
||||||
if (StringUtils.equals(testPlanReport.getTriggerMode(), ReportTriggerMode.API.name())) {
|
if (StringUtils.equals(testPlanReport.getTriggerMode(), ReportTriggerMode.API.name())) {
|
||||||
subject = Translator.get("task_notification_jenkins");
|
subject = "Jenkins任务通知";
|
||||||
} else {
|
} else {
|
||||||
subject = Translator.get("task_notification");
|
subject = "任务通知";
|
||||||
}
|
}
|
||||||
// 计算通过率
|
// 计算通过率
|
||||||
TestPlanDTOWithMetric testPlanDTOWithMetric = BeanUtils.copyBean(new TestPlanDTOWithMetric(), testPlan);
|
TestPlanDTOWithMetric testPlanDTOWithMetric = BeanUtils.copyBean(new TestPlanDTOWithMetric(), testPlan);
|
||||||
|
|
Loading…
Reference in New Issue