44 Star 426 Fork 190

7y / apiAutoTest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

2022.02.28 更新(上方图标可点击)

使用Python语言 + Python第三方库 实现的接口自动化测试工具,使用该工具 Python版本 >= 3.8

IsXMnO.png

配套资源(点击即可跳转)

实现功能

  • 测试数据隔离: 测试前后进行数据库备份/还原
  • 接口间数据依赖: 需要B接口使用A接口响应中的某个字段作为参数
  • 自定义扩展方法: 在用例中使用自定义方法(如:获取当前时间戳...)的返回值
  • 接口录制:录制指定包含url的接口,生成用例数据
  • 用例跳过:支持表达式、内置函数、调用变量实现条件跳过用例
  • 动态多断言: 可(多个)动态提取实际预期结果与指定的预期结果进行比较断言操作
  • 对接数据库: 讲数据库的查询结果可直接用于断言操作
  • 邮件发送:将allure报告压缩后已附件形式发送

所用依赖库

allure-pytest==2.9.45		# allure报告
jsonpath==0.82				# json解析库
loguru==0.6.0				# 日志库
pytest==7.0.1				# 参数化
PyYAML==6.0				    # 读取ymal
requests==2.27.1			# 请求HTTP/HTTPS
xlrd==1.2.0					# 读取excel
yagmail==0.11.224			# 发送邮件
PyMySQL==0.10.1				# 连接mysql数据库
paramiko==2.9.2				# SSH2 连接
xlwt==1.3.0                 # 写excel 用例文件
mitmproxy==7.0.4            # 抓包工具

联系

QQ群:930902996

MIT License Copyright (c) 2020 zy7y Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Pytest+allure+jsonpath+requests接口自动化测试工具,支持sql断言,数据依赖,测试数据隔离,扩展函数定义,接口录制生成用例数据以减少写用例时间. 展开 收起
Python 等 2 种语言
MIT
取消

发行版 (3)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/zy7y/apiAutoTest.git
git@gitee.com:zy7y/apiAutoTest.git
zy7y
apiAutoTest
apiAutoTest
master

搜索帮助

14c37bed 8189591 565d56ea 8189591