pytestDemo:使用 Python+Requests+Pytest+YAML+Allure 实现接口自动化-源码

上传者: 42126668 | 上传时间: 2021-09-27 15:58:03 | 文件大小: 26KB | 文件类型: ZIP
pytestDemo 本项目实现接口自动化的技术选型:Python+Requests+Pytest+YAML+Allure ,主要是针对本人的一个接口项目来开展的,通过 Python+Requests 来发送和处理HTTP协议的请求接口,使用 Pytest 作为测试执行器,使用 YAML 来管理测试数据,使用 Allure 来生成测试报告。 相关接口项目: 项目说明 本项目在实现过程中,把整个项目拆分成请求方法封装、HTTP接口封装、关键字封装、测试用例等模块。 首先利用Python把HTTP接口封装成Python接口,接着把这些Python接口组装成一个个的关键字,再把关键字组装成测试用例,而测试数据则通过YAML文件进行统一管理,然后再通过Pytest测试执行器来运行这些脚本,并结合Allure输出测试报告。 当然,如果感兴趣的话,还可以再对接口自动化进行Jenkins持续集成。 项目

文件下载

资源详情

[{"title":"( 36 个子文件 26KB ) pytestDemo:使用 Python+Requests+Pytest+YAML+Allure 实现接口自动化-源码","children":[{"title":"pytestDemo-master","children":[{"title":"common","children":[{"title":"mysql_operate.py <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"read_data.py <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"logger.py <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false}],"spread":true},{"title":"testcases","children":[{"title":"api_test","children":[{"title":"test_05_delete_user.py <span style='color:#111;'> 2.31KB </span>","children":null,"spread":false},{"title":"test_02_register.py <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"test_03_login.py <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"test_01_get_user_info.py <span style='color:#111;'> 3.16KB </span>","children":null,"spread":false},{"title":"conftest.py <span style='color:#111;'> 202B </span>","children":null,"spread":false},{"title":"test_04_update_user.py <span style='color:#111;'> 2.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"scenario_test","children":[{"title":"test_02_register_login_update.py <span style='color:#111;'> 6.03KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"test_01_register_login_list.py <span style='color:#111;'> 2.62KB </span>","children":null,"spread":false},{"title":"conftest.py <span style='color:#111;'> 212B </span>","children":null,"spread":false},{"title":"test_04_repeat_register.py <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"test_03_register_login_delete.py <span style='color:#111;'> 4.83KB </span>","children":null,"spread":false}],"spread":true},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"conftest.py <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false}],"spread":true},{"title":"core","children":[{"title":"rest_client.py <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"result_base.py <span style='color:#111;'> 29B </span>","children":null,"spread":false}],"spread":true},{"title":"requirements.txt <span style='color:#111;'> 81B </span>","children":null,"spread":false},{"title":"pytest.ini <span style='color:#111;'> 216B </span>","children":null,"spread":false},{"title":"config","children":[{"title":"setting.ini <span style='color:#111;'> 194B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 3.32KB </span>","children":null,"spread":false},{"title":"operation","children":[{"title":"user.py <span style='color:#111;'> 5.11KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"api","children":[{"title":"user.py <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"data","children":[{"title":"api_test_data.yml <span style='color:#111;'> 1.94KB </span>","children":null,"spread":false},{"title":"base_data.yml <span style='color:#111;'> 456B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"scenario_test_data.yml <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明