Metadata-Version: 2.4
Name: pytestifyx
Version: 0.9.5
Summary: pytestifyx is a pytest-based automation testing framework for api, ui, app testing
Home-page: https://github.com/jaylu2018/PyTestifyx
Author: luyh
Author-email: luyh <jaylu1995@outlook.com>
License: Apache License 2.0
Project-URL: Homepage, https://github.com/jaylu2018/PyTestifyx
Project-URL: Repository, https://github.com/jaylu2018/PyTestifyx
Project-URL: Issues, https://github.com/jaylu2018/PyTestifyx/issues
Keywords: pytest,automation,testing,api,ui,app
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytest>=8.2.1
Requires-Dist: playwright>=1.40.0
Requires-Dist: pytest-playwright>=0.4.3
Requires-Dist: pytest-cases>=3.8.1
Requires-Dist: loguru>=0.7.2
Requires-Dist: prettytable>=3.9.0
Requires-Dist: deepdiff>=6.7.1
Requires-Dist: requests>=2.31.0
Requires-Dist: requests_toolbelt>=1.0.0
Requires-Dist: PyYAML>=6.0.1
Requires-Dist: setuptools>=80.9.0
Provides-Extra: dev
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Dynamic: author
Dynamic: home-page
Dynamic: license-file

# PyTestifyx 🚀

[![PyPI version](https://badge.fury.io/py/pytestifyx.svg)](https://badge.fury.io/py/pytestifyx)
[![Python versions](https://img.shields.io/pypi/pyversions/pytestifyx.svg)](https://pypi.org/project/pytestifyx/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

> 基于pytest的现代化自动化测试框架，支持API、UI、APP全场景测试

PyTestifyx 是一个功能强大且易于使用的测试自动化框架，专为现代软件测试需求而设计。它集成了众多优秀的测试工具和库，为测试工程师提供一站式的测试解决方案。

## ✨ 主要特性

### 🔧 核心功能
- **多场景支持**: API测试、Web UI测试、移动APP测试
- **pytest集成**: 基于pytest生态，享受丰富的插件系统
- **数据驱动**: 内置数据工厂，支持多种测试数据生成策略
- **智能断言**: 支持数据库断言、深度对比等高级断言
- **报告系统**: 美观的测试报告和日志系统

### 🛠️ 技术栈
- **Web测试**: Playwright集成，支持现代浏览器
- **API测试**: 基于requests，支持RESTful API测试
- **数据库**: 支持多种数据库操作和断言
- **协议支持**: Dubbo协议支持
- **消息推送**: 支持邮件、飞书等通知方式

### 🌟 独特优势
- **中文友好**: 内置中文字符处理优化
- **模块化设计**: 灵活的架构，易于扩展
- **工具丰富**: 包含Fiddler解析、图片转Base64等实用工具
- **装饰器支持**: 提供登录、数据库等常用装饰器

## 📦 快速安装

```bash
pip install pytestifyx
```

## 🚀 快速开始

### 1. 创建项目脚手架
```bash
pytestifyx create-project my-test-project
```

### 2. 编写第一个API测试
```python
import pytest
from pytestifyx import TestCase

class TestAPI(TestCase):
    def test_get_user_info(self):
        response = self.api.get("/api/user/1")
        assert response.status_code == 200
        assert response.json()["id"] == 1
```

### 3. 运行测试
```bash
pytest tests/ -v
```

## 📚 功能模块

| 模块 | 功能描述 | 主要特性 |
|------|----------|----------|
| **Core** | 核心测试基类 | 统一的测试入口和配置管理 |
| **Driver** | 驱动管理 | Web/API驱动的统一管理 |
| **Utils** | 工具集合 | 日志、数据工厂、装饰器等 |
| **Database** | 数据库操作 | 数据库连接、断言、用例管理 |
| **Data Factory** | 数据生成 | 智能测试数据生成和管理 |
| **Message Push** | 消息通知 | 测试结果推送和通知 |

## 🔧 配置示例

```yaml
# pytestifyx.yaml
database:
  host: localhost
  port: 3306
  user: test_user
  password: test_pass

api:
  base_url: https://api.example.com
  timeout: 30

logging:
  level: INFO
  format: detailed
```

## 📈 版本历史

查看 [CHANGELOG.md](CHANGELOG.md) 了解详细的版本更新内容。

### 最新版本 v0.9.0
- ✅ 全新的模块化架构
- ✅ 增强的数据工厂功能
- ✅ 改进的日志系统
- ✅ 新增Fiddler解析工具
- ✅ 优化中文字符处理

## 🤝 贡献指南

我们欢迎所有形式的贡献！请查看我们的贡献指南了解如何参与项目开发。

1. Fork 项目
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启 Pull Request

## 📄 许可证

本项目基于 Apache License 2.0 许可证开源。详见 [LICENSE](LICENSE) 文件。

## 🔗 相关链接

- [PyPI 页面](https://pypi.org/project/pytestifyx/)
- [GitHub 仓库](https://github.com/jaylu2018/PyTestifyx)
- [问题反馈](https://github.com/jaylu2018/PyTestifyx/issues)
- [更新日志](CHANGELOG.md)

## 🙋‍♂️ 支持与反馈

如果您在使用过程中遇到问题或有改进建议，请：

1. 查看 [FAQ](https://github.com/jaylu2018/PyTestifyx/wiki/FAQ)
2. 搜索现有的 [Issues](https://github.com/jaylu2018/PyTestifyx/issues)
3. 创建新的 Issue 描述您的问题

---

⭐ 如果这个项目对您有帮助，请给我们一个星标支持！
