api-test-generatorlisted
Install: claude install-skill Microck/ordinary-claude-skills
# MikoPBX API Test Generating
Generate comprehensive Python pytest tests for MikoPBX REST API endpoints with full parameter coverage, schema validation, and edge case testing.
## What This Skill Does
Analyzes DataStructure.php files and generates complete pytest test suites including:
- ✅ CRUD operation tests (Create, Read, Update, Delete)
- ✅ Positive and negative test cases
- ✅ Parameter validation tests
- ✅ Edge cases and boundary conditions
- ✅ Schema validation tests
- ✅ Proper fixtures and authentication
- ✅ Detailed assertions with error messages
## When to Use This Skill
Use this skill when you need to:
- Create pytest tests for new REST API endpoints
- Add comprehensive test coverage for existing endpoints
- Generate tests covering all parameter combinations
- Add schema validation tests for API responses
- Create edge case and negative tests
- Ensure API compliance with OpenAPI specification
## Quick Start
### Basic Usage
When the user requests test generation:
1. **Identify the endpoint**
- API path (e.g., `/pbxcore/api/v3/extensions`)
- HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Resource name (e.g., Extensions)
2. **Locate DataStructure.php**
```bash
find /Users/nb/PhpstormProjects/mikopbx/Core/src/PBXCoreREST/Lib -name "DataStructure.php" | grep -i "{resource}"
```
3. **Analyze parameter definitions**
Extract from `DataStructure.php`:
- Required vs optional parameters
- Data types and validation rules
- Default values