GithubHelp home page GithubHelp logo

weshanks / apiautotest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zy7y/apiautotest

0.0 0.0 0.0 7.46 MB

Python+Requests+jsonpath+xlrd接口自动化测试工具,实现数据依赖,支持restful规范,sql断言以及测试前后数据隔离操作,自定义扩展方法,可作用于用例当中

Home Page: https://zy7y.github.io/apiAutoTest/

License: MIT License

Python 100.00%

apiautotest's Introduction

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

apiautotest's People

Contributors

zy7y avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.