摘要: 到现在为止,发送邮件(email_module)、读excel(excel_module)、发送requests(requests_module)、常量(setting)我们都已经完成了,看看第一篇中的截图,剩下的也不多了,今天我们先写读接口地址的文件,environment_module.py: 阅读全文
posted @ 2017-11-13 10:30 孟船长 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 把下面的代码放在requests_module.py文件中 # coding: utf-8 import requests import logging from requests.exceptions import * class GetResponse(): def __init__(self, 阅读全文
posted @ 2017-11-13 10:28 孟船长 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 今天完善excel_module.py文件,上代码: # coding: utf-8 import xlrd class ReadExcel(): def __init__(self, file_name): self.data = xlrd.open_workbook(file_name) def 阅读全文
posted @ 2017-11-13 10:25 孟船长 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 基础知识已经准备的差不多了,今天开始我们就开始写我们的接口测试框架,框架结构已经说过了: 今天我们先完善需要的常量,也就是setting.py文件中的内容,代码如下: # coding: utf-8 import logging import os import time import inspec 阅读全文
posted @ 2017-11-13 10:21 孟船长 阅读(279) 评论(0) 推荐(0) 编辑