Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Python+Requests+jsonpath+xlrd接口自动化测试工具,实现数据依赖,支持restful规范,sql断言以及测试前后数据隔离操作,自定义扩展方法,可作用于用例当中;video https://www.bilibili.com/video/BV1rr4y1r754/?vd_source=f824feef5305252d9a349520313fd4db

License

Notifications You must be signed in to change notification settings

zy7y/apiAutoTest

Open more actions menu

Repository files navigation

使用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

About

Python+Requests+jsonpath+xlrd接口自动化测试工具,实现数据依赖,支持restful规范,sql断言以及测试前后数据隔离操作,自定义扩展方法,可作用于用例当中;video https://www.bilibili.com/video/BV1rr4y1r754/?vd_source=f824feef5305252d9a349520313fd4db

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.