diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index ba7836e762..2b765169fe 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -243,21 +243,23 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo(); String url = reportUrl; + String url2 = reportUrl; if (StringUtils.isEmpty(url)) { url = baseSystemConfigDTO.getUrl() + "/#/api/report/view/" + report.getId(); + url2 = baseSystemConfigDTO.getUrl() + "/#/api/automation/report"; } String successContext = ""; String failedContext = ""; String subject = ""; String event = ""; if (StringUtils.equals(ReportTriggerMode.API.name(), report.getTriggerMode())) { - successContext = "接口测试 API任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; - failedContext = "接口测试 API任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + successContext = "接口测试 API任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; + failedContext = "接口测试 API任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; subject = Translator.get("task_notification_jenkins"); } if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), report.getTriggerMode())) { - successContext = "接口测试定时任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; - failedContext = "接口测试定时任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + successContext = "接口测试定时任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; + failedContext = "接口测试定时任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; subject = Translator.get("task_notification"); } if (StringUtils.equals("Success", report.getStatus())) { diff --git a/backend/src/main/resources/mail/ApiFailedNotification.html b/backend/src/main/resources/mail/ApiFailedNotification.html index aed24551e0..dded07b788 100644 --- a/backend/src/main/resources/mail/ApiFailedNotification.html +++ b/backend/src/main/resources/mail/ApiFailedNotification.html @@ -14,6 +14,8 @@
您所执行的 ${testName} 接口测试运行失败
请点击下面链接进入测试报告页面
新版接口测试报告路径
+ ${url}/#/api/automation diff --git a/backend/src/main/resources/mail/ApiSuccessfulNotification.html b/backend/src/main/resources/mail/ApiSuccessfulNotification.html index 6512d5089f..11dc44ebc3 100644 --- a/backend/src/main/resources/mail/ApiSuccessfulNotification.html +++ b/backend/src/main/resources/mail/ApiSuccessfulNotification.html @@ -13,6 +13,8 @@您所执行的 ${testName} 接口测试运行成功
请点击下面链接进入测试报告页面
新版接口测试报告路径
+ ${url}/#/api/automation