fix(测试跟踪): jenkins执行测试计划时不再会同时触发测试计划的通知和场景用例的通知
--bug=1013358 --user=宋天阳 【消息通知】用jenkins 跑一个包含100+ 场景的测试计划,邮箱收到100+条通知,建议只接收执行该测试计划的一个通知 https://www.tapd.cn/55049933/s/1173807
This commit is contained in:
parent
700107a073
commit
1689b29b02
|
@ -221,6 +221,10 @@ public class ApiScenarioReportService {
|
|||
if (StringUtils.equals(reportType, RunModeConstants.SET_REPORT.toString())) {
|
||||
return report;
|
||||
}
|
||||
if(StringUtils.equalsAnyIgnoreCase(report.getTriggerMode(),ReportTriggerMode.JENKINS_RUN_TEST_PLAN.name())){
|
||||
//jenkins运行测试计划时执行的场景,触发方式改回API
|
||||
report.setTriggerMode(ReportTriggerMode.API.name());
|
||||
}
|
||||
if (runMode.equals("CASE")) {
|
||||
report.setTriggerMode(TriggerMode.MANUAL.name());
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ public enum ReportTriggerMode {
|
|||
MANUAL,
|
||||
SCHEDULE,
|
||||
API,
|
||||
JENKINS_RUN_TEST_PLAN,
|
||||
/**
|
||||
* 性能测试用例执行触发报告
|
||||
*/
|
||||
|
|
|
@ -1020,7 +1020,7 @@ public class TestPlanService {
|
|||
scenarioRequest.setReportId(scenarioReportID);
|
||||
scenarioRequest.setProjectId(projectID);
|
||||
if (StringUtils.equals(triggerMode, ReportTriggerMode.API.name())) {
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.API.name());
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.JENKINS_RUN_TEST_PLAN.name());
|
||||
scenarioRequest.setRunMode(ApiRunMode.JENKINS_SCENARIO_PLAN.name());
|
||||
} else if (StringUtils.equals(triggerMode, ReportTriggerMode.MANUAL.name())) {
|
||||
scenarioRequest.setTriggerMode(ReportTriggerMode.MANUAL.name());
|
||||
|
|
Loading…
Reference in New Issue