Giter Site home page Giter Site logo

pyautotest's Introduction

pyautoTest Web UI 自动化项目

特点:

  • 全局配置浏览器启动/关闭。
  • 测试用例运行失败自动截图。
  • 测试用例运行失败可以重跑。
  • 测试数据参数化。

安装:

$ pip install -r requirements.txt

注:安装requirements.txt指定依赖库的版本,这是经过测试的,有时候新的版本可会有错。

配置:

conftest.py 文件配置

# 配置浏览器驱动类型。
driver_type = "chrome"

# 配置运行的 URL
url = "https://www.baidu.com"

# 失败重跑次数
rerun = "3"

# 当达到最大失败数,停止执行
max_fail = "5"

# 运行测试用例的目录或文件
cases_path = "./test_dir/"

运行:

不支持在编辑器中运行,请在 cmd(windows)/终端(Linux)下执行。

$ python run_tests.py  (回归模式,生成HTML报告)
$ python run_tests.py -m debug  (调试模式)

pyautotest's People

Contributors

fnngj avatar defnngj avatar

Watchers

James Cloos 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.