Commit c83a0de6 authored by yz's avatar yz

增加流量线测试群提醒

parent 3c32590f
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
from servers.ddMessageServer import DDMessage
import time
# 机器人提醒地址,测试群
dingTalkUrl = "https://oapi.dingtalk.com/robot/send?access_token=fb8da62f0af606820fe8bdfdf8ea261d468f09b57c22faaa454d45855ea82eef"
# 密钥,签名算法需要,测试群
secret = 'SECf2cc843306d667575a491650c777d8aa21788c4c60f3f0949d5d0b61c86e5aef'
# 获取时间戳,签名算法需要,并且需要和签名一起拼到链接后面
timestamp = str(round(time.time() * 1000))
# 获取签名
sign = DDMessage.get_sign(timestamp,secret)
# 拼接完整的url,用于鉴权
fullUrl = dingTalkUrl+"&timestamp="+timestamp+"&sign="+sign
# 构造要发送的信息
content1 = "请及时上传测试用例:http://cf.dui88.com/pages/viewpage.action?pageId=67163149"
content2 = "bug请及时上报jira并更新状态:http://jira.dui88.com"
content3 = "业务文档请及时更新:http://cf.dui88.com/pages/viewpage.action?pageId=78912619"
# 发送信息
# DDMessage.send_message(fullUrl,content1)
# DDMessage.send_message(fullUrl,content2)
# DDMessage.send_message(fullUrl,content3)
DDMessage.send_message(fullUrl,content1+'\n'+content3)
\ No newline at end of file
from servers.ddMessageServer import DDMessage
import time
# 机器人提醒地址,测试群
dingTalkUrl = "https://oapi.dingtalk.com/robot/send?access_token=903ab8b3ba3d46e7c8b934ef83038bd6037e56c04a985e43fab8f2e0bd359cad"
# 密钥,签名算法需要,测试群
secret = 'SEC7e57fbdd5b20103208482f520420139072d84c754a3cd624641623bd2f225af3'
# 获取时间戳,签名算法需要,并且需要和签名一起拼到链接后面
timestamp = str(round(time.time() * 1000))
# 获取签名
sign = DDMessage.get_sign(timestamp,secret)
# 拼接完整的url,用于鉴权
fullUrl = dingTalkUrl+"&timestamp="+timestamp+"&sign="+sign
# 构造要发送的信息
content1 = "请及时维护流量线测试排期列表:http://cf.dui88.com/pages/viewpage.action?pageId=81484880"
content2 = "测试用例及时上传:http://cf.dui88.com/pages/viewpage.action?pageId=67163062"
# 发送信息
DDMessage.send_message(fullUrl,content1+'\n'+content2)
\ No newline at end of file
import requests
import time
import hmac
import hashlib
import base64
......@@ -7,10 +6,6 @@ import urllib.parse
import json
# http://gitlab2.dui88.com/yaozheng/dingdingMessage.git
# https://oapi.dingtalk.com/robot/send?access_token=fb8da62f0af606820fe8bdfdf8ea261d468f09b57c22faaa454d45855ea82eef
# SECf2cc843306d667575a491650c777d8aa21788c4c60f3f0949d5d0b61c86e5aef
class DDMessage:
# 获得签名
@classmethod
......@@ -37,28 +32,3 @@ class DDMessage:
}
r = requests.post(url=url,data=json.dumps(message),headers=headers).json()
print(r)
\ No newline at end of file
# 机器人提醒地址
dingTalkUrl = "https://oapi.dingtalk.com/robot/send?access_token=fb8da62f0af606820fe8bdfdf8ea261d468f09b57c22faaa454d45855ea82eef"
# 密钥,签名算法需要
secret = 'SECf2cc843306d667575a491650c777d8aa21788c4c60f3f0949d5d0b61c86e5aef'
# 获取时间戳,签名算法需要,并且需要和签名一起拼到链接后面
timestamp = str(round(time.time() * 1000))
# 获取签名
sign = DDMessage.get_sign(timestamp,secret)
# 拼接完整的url,用于鉴权
fullUrl = dingTalkUrl+"&timestamp="+timestamp+"&sign="+sign
# 获取要发送的信息
content1 = "请及时上传测试用例:http://cf.dui88.com/pages/viewpage.action?pageId=67163149"
content2 = "bug请及时上报jira并更新状态:http://jira.dui88.com"
content3 = "业务文档请及时更新:http://cf.dui88.com/pages/viewpage.action?pageId=78912619"
# 发送信息
DDMessage.send_message(fullUrl,content1)
DDMessage.send_message(fullUrl,content2)
DDMessage.send_message(fullUrl,content3)
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