(十)Python3 接口自动化测试,测试结果发送邮件
1.前言
Windows本地执行的话,可自行编写发送邮件方法发送邮件。
Jenkins执行的话,可用jenkins配套邮件发送邮件。
2.发送邮件示例
# -*- coding: utf-8 -*-
# 主程序
import sys
sys.path.append('./server')
sys.path.append('./utils')import sendemaildict_mail={}
dict_mail['server'] = "imap.exmail.qq.com"
dict_mail['port'] ="465"
dict_mail['sender_email'] = "hmf@ciphergateway.com"
dict_mail['password'] ="456789Hu"
dict_mail['receiver_email'] = "3177038@qq.com"
dict_mail['mail_tittle'] = "API接