接口自动化测试,完整入门篇
接口自动化完整入门篇: https://www.cnblogs.com/lovesoo/p/7845731.html 接口自动化脚本 # encoding: utf-8 import sys import os reload(sys) sys.setdefaultencoding("utf-8") import requests import json from datetime import datetime as dt import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from functools import partial from nose.tools import * def send_mail(): # 读取测试报告内容 with open(report_file, 'r') as f: content = f.read().decode('utf-8') msg = MIMEMultipart('mixed') # 添加邮件内容 msg_html = MIMEText(content, 'html', 'utf-8') msg.attach(msg_html) # 添加附件 msg_attachment =