|
@@ -76,12 +76,12 @@ def DingTalkSend(info):
|
|
|
# "\n\n用例未执行数: " + status_defects +
|
|
|
"\n\n用例通过数量: " + status_passed +
|
|
|
'''\n\n<font>用例失败数量: </font><font color=\'#FF0000\' size=2>%s</font> \n\n''' +
|
|
|
- "\n\n响应超过2s接口汇总:"+ out_time_url+
|
|
|
+ "\n\n响应超过2s接口汇总:" + out_time_url +
|
|
|
# "\n\n构建地址:\n" + job_url +
|
|
|
"\n\n测试报告地址: \n" + report_url +
|
|
|
"\n\n播报时间: " + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) % (status_defects)
|
|
|
|
|
|
- dd_robot = DingtalkChatbot(read_config_yaml("dingding", "test_yunwin_webhook"))
|
|
|
+ dd_robot = DingtalkChatbot(read_config_yaml("dingding", "prod_webhook"))
|
|
|
ret = dd_robot.send_markdown(title='青春重庆', text=text, is_at_all=False)
|
|
|
print(ret)
|
|
|
|
|
@@ -94,9 +94,9 @@ def dingtalk_send_warning(msg):
|
|
|
"""
|
|
|
try:
|
|
|
res_time = round(msg.elapsed.total_seconds() * 1000, 2)
|
|
|
- text = f"<font color=\'#FFA500\'>[通知] </font>青春重庆-报警"\
|
|
|
+ text = f"<font color=\'#FFA500\'>[通知] </font>青春重庆-报警" \
|
|
|
f"\n\n>请求接口路径: {msg.url} " \
|
|
|
- f"\n\n>请求体: {str(msg.request.body).replace('%','')} "\
|
|
|
+ f"\n\n>请求体: {str(msg.request.body).replace('%', '')} " \
|
|
|
f"\n\n>接口响应时间: {res_time}毫秒 " \
|
|
|
f"\n\n>播报时间: {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} "
|
|
|
|