提交 a537892d 编写于 作者: W wenyann

fix:接口测试不执行

上级 be136e99
......@@ -120,9 +120,18 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
queue.clear();
super.teardownTest(context);
NoticeService noticeService = CommonBeanFactory.getBean(NoticeService.class);
List<Notice> notice = noticeService.queryNotice(testResult.getTestId());
List<Notice> notice = null;
try {
notice = noticeService.queryNotice(testResult.getTestId());
} catch (Exception e) {
e.printStackTrace();
}
MailService mailService = CommonBeanFactory.getBean(MailService.class);
mailService.sendHtml(report.getId(), notice, report.getStatus(), "api");
try {
mailService.sendHtml(report.getId(), notice, report.getStatus(), "api");
} catch (Exception e) {
e.printStackTrace();
}
}
private RequestResult getRequestResult(SampleResult result) {
......
......@@ -65,6 +65,7 @@ public class MailService {
} else if (type.equals("performance")) {
LoadTestDTO performanceResult = apiAndPerformanceHelper.getPerformance(id);
testName = performanceResult.getName();
status = performanceResult.getStatus();
}
String html1 = "<!DOCTYPE html>\n" +
"<html lang=\"en\">\n" +
......
......@@ -239,7 +239,7 @@ public class PerformanceTestService {
startEngine(loadTest, engine, request.getTriggerMode());
if (request.getTriggerMode().equals("SCHEDULE")) {
List<Notice> notice = noticeService.queryNotice(request.getId());
mailService.sendHtml(engine.getReportId(), notice, "success", "performance");
mailService.sendHtml(engine.getReportId(), notice, "status", "performance");
}
return engine.getReportId();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册