Authored by xuhui

集成测试-添加运维邮箱

package com.ui.contants;
/**
* 名称定死
* @author hui.xu
*
*/
public class AlarmGroupContants {
/**
* 报警组
* 运维组
*/
public final static String GROUP_NAME_YUNWEI = "运维组";
}
\ No newline at end of file
... ...
... ... @@ -265,4 +265,6 @@ public class HttpUriContants {
public static final String GET_ALARMGROUP_ADD_OR_UPDATE = "/alarmGroup/addOrUpdateAlarmGroup";
public static final String GET_ALARMGROUP_DELETE_BY_ID = "/alarmGroup/deleteAlarmGroupById";
public static final String GET_ALARMGROUP_GET_ALL = "/alarmGroup/getAllAlarmGroup";
}
public static final String GET_EMAIL_BY_ALARM_GROUP = "/user/getEmailByAlarmGroup";
}
\ No newline at end of file
... ...
... ... @@ -2,6 +2,7 @@ package com.ui.ctrl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ui.contants.AlarmGroupContants;
import com.ui.contants.HttpUriContants;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
... ... @@ -409,6 +410,10 @@ public class ProjectBuildCtrl {
public BaseResponse testexecute(String env) {
AutoTestReq autoTestReq = new AutoTestReq();
autoTestReq.setEnv(env);
BaseResponse emailResponse = httpRestClient.defaultPost(HttpUriContants.GET_EMAIL_BY_ALARM_GROUP+"?groupName=" + AlarmGroupContants.GROUP_NAME_YUNWEI, null, BaseResponse.class);
if(emailResponse.getData() != null){
autoTestReq.setMailto((String)emailResponse.getData());
}
BaseResponse baseResponse = httpRestClient.post("http://qmc.yohops.com:9999/autoTask/executeApiAutoTask", autoTestReq, BaseResponse.class);
return baseResponse;
}
... ...