An AI-powered test plan generation system that creates high-quality prompts for guiding AI assistants (ChatGPT, Claude, etc.) to generate targeted test plans and test cases.
- Source Code Mode: Automatically analyze project structure and codebase
- Configuration Mode: Generate prompts from project configuration files (with automatic quality enhancement)
- Unit, Integration, Performance, Security testing
- End-to-End, Stress, Mobile, API, Microservice, Database testing
- Feature-specific and project-level test generation
- Intelligent template selection based on project type
- Context-aware prompt generation
- Support for multiple technology stacks
- Smart inference engine for configuration completion
- Domain knowledge base integration
- No manual configuration required for config mode
prompt_generator/
โโโ analyzer/ # Project analysis and quality enhancement
โโโ templates/ # Comprehensive prompt template library
โโโ generator/ # Template combination and prompt generation
โโโ knowledge/ # Domain knowledge base
โโโ config/ # Configuration templates and settings
โโโ main.py # Main execution script
# Install dependencies
pip install -r requirements.txtAnalyze existing projects with source code:
# Generate prompt by test type (recommended)
python main.py --project-path /path/to/project --test-type unit
python main.py --project-path /path/to/project --test-type integration
python main.py --project-path /path/to/project --test-type performance
# Generate test plan for specific feature
python main.py --project-path /path/to/project --create-test-plan-prompt --feature-name auth --test-type security
# Generate test cases from existing test plan
python main.py --project-path /path/to/project --create-test-case-prompt --test-plan-path plan.mdFor projects without accessible source code, using configuration files with automatic quality enhancement:
# Basic usage (automatic quality enhancement applied)
python main.py --config-file my_project_config.yaml --test-type unit
python main.py --config-file my_project_config.yaml --test-type integration --verbose
# Feature-specific testing
python main.py --config-file my_project_config.yaml --create-test-plan-prompt --feature-name user_auth --test-type securityConfiguration Setup:
- Copy the template:
cp config/project_config_template.yaml my_project_config.yaml - Edit the configuration file with your project details
- Run with
--config-fileparameter
# List all supported test types
python main.py --list-test-types
# List available prompt templates
python main.py --list-prompt-templates
# List project features (source code mode only)
python main.py --project-path /path/to/project --list-features
# Save analysis results
python main.py --project-path /path/to/project --test-type unit --save-analysis
# Verbose output
python main.py --config-file config.yaml --test-type unit --verbose| Category | Test Types | Description |
|---|---|---|
| Basic Tests | unit, integration | Core functionality testing |
| Performance | performance, stress | Load and stress testing |
| System Tests | e2e, security | End-to-end and security testing |
| Specialized | mobile, api, microservice, database | Technology-specific testing |
- Web Applications: Flask, Django, FastAPI, React, Vue, Angular
- API Services: RESTful APIs, GraphQL, Microservices
- Mobile Applications: iOS, Android, React Native
- Machine Learning: TensorFlow, PyTorch, Scikit-learn
- Federated Learning: NVFlare, PySyft
- Database Systems: SQL, NoSQL, Data warehouses
- Generic Projects: Any software project
When using Configuration Mode, the system automatically applies:
- Automatically infers missing project details
- Suggests test scenarios based on technology stack
- Identifies potential risk areas
- Industry best practices integration
- Technology-specific testing patterns
- Quality metrics and standards
- Multi-dimensional quality scoring
- Completeness and specificity analysis
- Confidence level evaluation
$ python main.py --project-path ./my-web-app --test-type integration
๐ Analyzing project: ./my-web-app
โ
Integration test prompt generated: prompt_result/test_plan_prompt_integration.md
๐ Test type: integration
๐ Template used: integration_test_prompt
๐ก Usage suggestions:
1. Copy prompt content to ChatGPT/Claude etc.
2. AI will generate detailed integration test plan
3. Ask follow-up questions about specific scenarios$ python main.py --config-file project_config.yaml --test-type unit --verbose
๐ฏ ๅฏ็จ่ดจ้ๅขๅผบๆจกๅผ...
โ
่ดจ้ๅขๅผบๅฎๆ๏ผ่ฏๅ: 0.73
๐ ๅบ็จ็ๅขๅผบๆๆฏ: ๆบ่ฝๆจๆญ, ้ขๅ็ฅ่ฏๅบ
โ
Unit test prompt generated: prompt_result/test_plan_prompt_unit_config.md
๐ง Mode: Configuration-basedCreate my_project_config.yaml based on config/project_config_template.yaml:
project_info:
name: "My Web Application"
description: "E-commerce platform with React frontend and Django backend"
type: "web_application"
tech_stack:
languages: ["Python", "JavaScript"]
frameworks: ["Django", "React"]
databases: ["PostgreSQL", "Redis"]
core_modules:
- name: "User Authentication"
description: "Login, registration, password reset"
- name: "Product Catalog"
description: "Product listing, search, filtering"
- name: "Shopping Cart"
description: "Add/remove items, checkout process"Generated prompts are optimized for AI assistants:
โ
Integration test prompt generated: prompt_result/test_plan_prompt_integration_config.md
๐ Test type: integration
๐ Template used: integration_test_prompt
๐ง Mode: Configuration-based
๐ก Usage suggestions:
1. Copy prompt content to ChatGPT/Claude etc. AI assistants
2. AI assistants will generate detailed integration test plan
3. You can ask follow-up questions about specific scenarios
4. Generated test cases are based on configuration information
- Fork the repository
- Create feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Ready to generate high-quality test plans? Start with a simple command:
python main.py --config-file config/project_config_template.yaml --test-type unit