# auto_http_api **Repository Path**: sumanwu/auto_http_api ## Basic Information - **Project Name**: auto_http_api - **Description**: python自动化接口测试 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-14 - **Last Updated**: 2021-06-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #项目名及简介 基于python3的自动化接口测试框架 # 功能 * Win7 64,python 3,Pycharm. unittest * xml管理用例 * 邮件发送测试结果 # 用法 * Runner_m.py 核心代码。run_case是程序的入口 * 配置xml ``` 接口测试 ddd.XX.com 80 [1001] # 不填,就是运行下面所有用例
{"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","User-Agent":"Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0"}
account 1361212121 1 password 222222 1 type 0 1 0 1001 登陆 POST Login {"appStatus":{"errorCode":0,"message":"操作... user_id # 登陆后需要返回的信息给其他接口调用,比如userid,token等 0 lookerId 2 1 1002 个人主页 GET GetPersonalHomePage1 {"appStatus":{"errorCode":0,"message":"操作成功"},"content":[{"business_name":"坤达点子","notice_img":"\/product\/20160718184134_321.jpg","user_type":1,"user_id":2,"goods":[{"good_price":45211.0,"good_id":12,"good_name":"艾欧","banner_picture1":"\/product\/20160719165135_8977.png"},{"good_price":199.0,"good_id":14,"good_name":"麒麟瓜1","banner_picture1":"\/product\/20160720102028_5352.jpg"},{"good_price":452.0,"good_id":6,"good_name":"实力产品","banner_picture1":"\/product\/20160718165448_2602.png"},{"good_price":99898.0,"good_id":11,"good_name":"越南芒果","banner_picture1":"\/product\/20160720100057_5877.jpg"}],"shop_img":"\/product\/20160718120144_3196.jpg","head_picture":"http:\/\/dgm.boweixin.com\/\/product\/20160718134528_4744.jpg","notice_id":1}]} 1 # 需要登陆后的参数 1 # 有嵌套层
注意这里,如果想验证这里的值的类型或者非必填参数,预期值注意变化 account # type=str表示字符类型 18576759587 1 # 1表示必填,0非必填 ``` ## 关于检查点 有嵌套层。检查机制是,检查第一层的code,第二层list的key是否相等,list的value的值的type是否相等 # 使用报告 ![test_mark.png](img/test_mark.png "test_mark.png") ![test_detail.png](img/test_detail.png "test_detail.png") # 其他 * 更多信息查看我的[更新日志](channel_log.md) * 之前写的[接口用例生成器](https://github.com/284772894/SaveXML)生产xml