Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defnngj/pyautotest
https://github.com/defnngj/pyautotest
pytest pytest-html python selenium
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/defnngj/pyautotest
- Owner: defnngj
- Created: 2018-06-09T08:07:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T08:11:50.000Z (5 months ago)
- Last Synced: 2024-12-21T09:07:03.360Z (13 days ago)
- Topics: pytest, pytest-html, python, selenium
- Language: HTML
- Size: 1.7 MB
- Stars: 105
- Watchers: 6
- Forks: 100
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyautoTest Web UI 自动化项目
### 特点
* 全局配置浏览器启动/关闭。
* 测试用例运行失败自动截图。
* 测试用例运行失败可以重跑。
* 测试数据参数化。### 安装
```shell
$ pip install -r requirements.txt
```注:安装```requirements.txt```指定依赖库的版本,这是经过测试的,有时候新的版本可会有错。
### 配置
在 `config.py` 文件配置
```python
class RunConfig:
"""
运行测试配置
"""
# 配置浏览器驱动类型。
driver_type = "chrome"# 失败重跑次数
rerun = "3"# 当达到最大失败数,停止执行
max_fail = "5"# 运行测试用例的目录或文件
cases_path = "./test_dir/"
```### 运行
**不支持在编辑器(pycharm/ VS code ...)中运行,请在 cmd(windows)/终端(Linux)下执行。**
```shell
$ python run_tests.py (回归模式,生成HTML报告)
$ python run_tests.py -m debug (调试模式)
```