# EasyTesting
**Repository Path**: lebu2018/easy-testing
## Basic Information
- **Project Name**: EasyTesting
- **Description**: EasyTesting 是基于 Django、DRF、SQLite、Bootstrap、HTTPRunner 及 Playwright 的接口与 UI 自动化测试平台。集成大模型(LLM),可按需自动生成功能测试用例,并支持修改与手动新增,用例可导出为 Excel 或 Markdown。平台支持异步执行测试用例与套件,涵盖接口调试、用例管理、自动化执行、报告查看、数据生成、定时调度与监控等全功能。
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: https://gitee.com/joyamon/easy-testing
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 36
- **Created**: 2026-06-10
- **Last Updated**: 2026-06-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# EasyTesting
EasyTesting is an API and UI automation testing platform built with Django, Django REST Framework, SQLite, Bootstrap, HTTPRunner, and Playwright. It integrates LLM capabilities to generate functional test cases from requirement descriptions, supports manual editing and creation, and can export generated cases to Excel or Markdown. The platform covers API debugging, test case management, automation execution, test reports, test data generation, scheduled task execution, and monitoring in a lightweight web interface.
## Notice
**Version v2.2.0 integrates AI/LLM capabilities. Python 3.10 or later is required, and Python 3.12 is recommended.**
## Recommended Environment
Python 3.10+ is required. Python 3.12 is recommended.
```txt
cryptography==43.0.0
Django==4.2.11
djangorestframework==3.15.2
jsonpath-ng==1.7.0
pydantic>=2.0.0
django-simpleui==2025.5.17
Faker==37.3.0
django-cors-headers==4.3.1
requests>=2.32.5
Pillow==10.1.0
celery==5.3.4
redis==5.0.1
croniter==2.0.1
django-celery-beat==2.5.0
xlwt==1.3.0
DBUtils==3.1.2
PyMySQL==1.1.2
pandas==2.3.3
playwright==1.58.0
django-filter==25.1
openpyxl==3.1.5
# Basic utilities
python-dotenv>=1.0.0
# LLM support
dashscope>=1.20.0
pymupdf>=1.23.0
python-docx>=1.0.0
```
## Features
1. **End-to-end API testing management**
Manage projects, environments, API test cases, test suites, test runs, test results, and reports in one workflow.
2. **AI-generated functional test cases**
Generate test cases from requirement text or attachments with rule-based generation, LLM generation, or hybrid generation.
3. **Structured requirement-to-case workflow**
The AI assistant module supports: create project -> enter requirements -> generate cases -> edit and optimize -> export Excel/Markdown.
4. **Attachment parsing**
Extract requirement content from Word, PDF, Markdown, text, Excel, and XMind files to assist test case generation.
5. **MCP tool integration**
Configure MCP services, list available tools, call tools, view call results, and review call history for external AI/tool integrations.
6. **API automation execution**
Supports API requests, assertions, response recording, execution status tracking, and failure diagnostics through HTTPRunner and built-in execution logic.
7. **Parameter extraction and chained API calls**
Extract values from responses through JSONPath and save them into environment variables for downstream requests.
8. **UI automation testing**
Integrates Playwright for UI test cases, UI suites, execution records, screenshots, and result management.
9. **Test data generation**
Provides mock/test data management to help build API testing data.
10. **Scheduled tasks and asynchronous execution**
Uses Celery, Redis, and Celery Beat for asynchronous execution, scheduled test runs, and background processing.
11. **Reports and exports**
View test reports and export generated cases or results to formats such as Excel and Markdown.
12. **Platform utilities**
Includes notifications, visitor logs, database connection tools, email configuration, domain checking, and other operational utilities.
13. **Unified web management UI**
Provides a Bootstrap-based web interface suitable for teams to manage testing assets centrally.
## Quick Start
1. Clone the repository:
```bash
git clone https://gitee.com/joyamon/easy-testing.git
```
2. Create and activate a virtual environment:
```bash
python -m venv venv
# Linux/macOS
source venv/bin/activate
# Windows
venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Copy the environment file:
```bash
# Windows
copy .env.example .env
# Linux/macOS
cp .env.example .env
```
Configure the Qwen API key in `.env`:
```env
DASHSCOPE_API_KEY=sk-xxxx
```
5. Create and apply database migrations:
```bash
python manage.py makemigrations
python manage.py migrate
```
6. Create an administrator account:
```bash
python manage.py createsuperuser
```
7. Start the development server:
```bash
python manage.py runserver
```
8. Start Celery worker and beat:
```bash
# Windows
celery -A EasyTesting worker -l info -P eventlet --pool=solo
celery -A EasyTesting beat -l info
# Linux
celery -A EasyTesting worker -l info
celery -A EasyTesting beat -l info
```
## Usage
1. Open http://localhost:8000/
2. Log in with your account.
3. Create projects, environments, test cases, and test suites.
4. Execute test cases or test suites and review results.
## AI Test Case Generation Workflow
```txt
Create project -> Enter requirements -> Generate cases -> Edit and optimize -> Export Excel/Markdown
```
1. **Create a project**: Click "New Project" and enter the project name and description.
2. **Enter requirements**: Open the project detail page, click "Add Requirement", and provide the requirement title and details.
3. **Generate cases**: Open the requirement detail page, choose a generation mode (rule-based, LLM, or hybrid), and generate test cases.
4. **Edit and optimize**: Adjust generated cases manually, including steps, expected results, priority, and status.
5. **Export**: Export the generated cases as Excel or Markdown from the requirement detail page.
## API Endpoints
The platform provides RESTful APIs for integration:
- `/api/projects/` - Manage projects
- `/api/environments/` - Manage environments
- `/api/test-cases/` - Manage test cases
- `/api/test-suites/` - Manage test suites
- `/api/test-runs/` - Manage test runs
- `/api/test-results/` - View test results
## Screenshots
## Support
If you find this project useful, you can support the author:
## Community
If the group QR code expires, please add the author's WeChat account and mention `gitee` when requesting to join the group.
## Contributors
Thanks to the following contributors:
- [jinpeng_zhang](https://gitee.com/jinpeng_zhang)
## License
This project is licensed under the MIT License.
## Acknowledgements
- [Django](https://www.djangoproject.com/)
- [Django REST framework](https://www.django-rest-framework.org/)
- [SQLite](https://www.sqlite.org/index.html)
- [Bootstrap](https://getbootstrap.com/)
- [HTTPRunner](https://httprunner.com/)
- [Django-SimpleUI](https://github.com/xui2013/django-simpleui)
- [Playwright](https://playwright.dev/)
- [Faker](https://faker.readthedocs.io/en/master/)
- [WorkBuddy](https://www.codebuddy.cn/)