# Pytest_Object **Repository Path**: dechengwang1510/pytest_object ## Basic Information - **Project Name**: Pytest_Object - **Description**: 基础框架搭建:这是一个基于Pytest的自动化测试框架,支持接口测试、UI测试和App测试,实现了Page Object设计模式和数据驱动设计。 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-13 - **Last Updated**: 2025-06-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 自动化测试框架 这是一个基于Python的自动化测试框架,支持接口测试、UI测试和App测试,并实现了Page Object设计模式。 ## 项目结构 ``` ├── config/ # 配置文件目录 ├── page_objects/ # 页面对象目录 │ ├── web/ # Web页面对象 │ ├── app/ # App页面对象 │ └── api/ # API接口对象 ├── test_cases/ # 测试用例目录 │ ├── web/ # Web测试用例 │ ├── app/ # App测试用例 │ └── api/ # API测试用例 ├── utils/ # 工具类目录 ├── reports/ # 测试报告目录 ├── conftest.py # pytest配置文件 ├── pytest.ini # pytest配置文件 └── requirements.txt # 项目依赖 ``` ## 安装依赖 ```bash pip install -r requirements.txt ``` ## 运行测试 1. 运行所有测试: ```bash pytest ``` 2. 运行特定类型的测试: ```bash # 运行接口测试 pytest --test-type=api # 运行Web UI测试 pytest --test-type=web # 运行App测试 pytest --test-type=app ``` 3. 生成Allure报告: ```bash pytest --alluredir=./reports/allure_results allure serve ./reports/allure_results ``` ## 环境要求 - Python 3.8+ - Chrome/Firefox (用于Web测试) - Appium Server (用于App测试)