Commit 91ac0a80 authored by liuchao1's avatar liuchao1

控制报告只钉钉推送一次

parent 5d2ce66f
...@@ -14,6 +14,12 @@ public class DingTalkUtils { ...@@ -14,6 +14,12 @@ public class DingTalkUtils {
// 通过钉钉机器人发送消息到钉钉群中 // 通过钉钉机器人发送消息到钉钉群中
public static void sendVal(String context)throws Exception{ public static void sendVal(String context)throws Exception{
if (!hasSend.compareAndSet(true, false)){
System.out.println("已经推送一次报告了");
return;
}
//测试结果 //测试结果
context = "【接口自动化测试结果反馈】\n" context = "【接口自动化测试结果反馈】\n"
+ context + context
...@@ -30,7 +36,7 @@ public class DingTalkUtils { ...@@ -30,7 +36,7 @@ public class DingTalkUtils {
params.put("text",contentParams); params.put("text",contentParams);
//发起dingding机器人通知 //发起dingding机器人通知
if (isPushReport && hasSend.compareAndSet(true, false)){ if (isPushReport){
// Response response = network.dingTalkRobot(params); // Response response = network.dingTalkRobot(params);
// System.out.println("钉钉 response:"+response.asString()); // System.out.println("钉钉 response:"+response.asString());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment