# aiche_api_test **Repository Path**: wangguosheng0816/aiche_api_test ## Basic Information - **Project Name**: aiche_api_test - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-07 - **Last Updated**: 2025-05-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 商户端接口自动化测试项目 ## 目录结构说明 ``` aiche_api_test/ │ ├── test_data/ # 测试数据与用例(YAML格式,按模块分文件) │ ├── xxx.yaml # 主流接口的YAML用例 │ └── legacy/ # 历史/归档用例 │ ├── test_suites/ # 测试脚本(pytest,按模块分文件) │ ├── test_xxx.py # 主流接口的pytest脚本 │ └── __pycache__/ # Python缓存目录(可定期清理) │ ├── conftest.py # pytest全局fixture与hook ├── requirements.txt # 依赖包清单 ├── README.md # 项目说明文档(本文件) │ ├── custom_allure_report/ # Allure自定义报告目录 │ ├── index.html │ ├── export/ │ └── history/ │ ├── allure-results/ # Allure原始结果(可自动清理) ├── .pytest_cache/ # pytest缓存(可自动清理) ├── .venv/ # 虚拟环境(可选,团队自定) ├── .git/ # Git版本库(可选) └── .idea/ # PyCharm等IDE配置(可选) ``` ## 说明 - **test_data/**:存放所有接口的YAML测试用例,支持参数化、变量池、断言扩展。legacy目录用于归档历史/废弃用例。 - **test_suites/**:存放pytest测试脚本,按模块分文件。__pycache__为Python自动生成的缓存目录。 - **conftest.py**:全局fixture、登录、token、header等通用逻辑。 - **requirements.txt**:项目依赖包清单,环境搭建时请先安装。 - **custom_allure_report/**:Allure自定义报告及相关资源。 - **allure-results/**、**.pytest_cache/**、**__pycache__/**:测试运行时自动生成的缓存/报告目录,可定期清理。 - **.venv/**、**.git/**、**.idea/**:虚拟环境、版本库、IDE配置,按团队实际需求保留。 - **run.py**:一键执行测试入口。 ## 快速上手 1. 克隆代码,安装依赖:`pip install -r requirements.txt` 2. 配置 test_data/config.yaml,填写base_url等信息 3. 编写/维护YAML用例,pytest脚本自动读取 4. 运行测试:`pytest` 或 `pytest --alluredir=allure-results` 5. 生成Allure报告:`allure serve allure-results` 如有问题请联系项目维护人或查阅详细文档。