api-test-generator

Generate Python pytest tests for MikoPBX REST API endpoints.

569|85|Updated Jun 7, 2019
One-click install
npx skills add https://github.com/mikopbx/Core --skill api-test-generator-mikopbx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-test-generator
Source: https://github.com/mikopbx/Core/tree/main/.claude/skills/api-test-generator
Command: npx skills add https://github.com/mikopbx/Core --skill api-test-generator-mikopbx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the generation of thorough Python pytest test suites for MikoPBX REST API endpoints, reducing manual testing effort and helping ensure OpenAPI schema alignment.

Core Features & Use Cases

  • CRUD test patterns: Generates tests for create, read, update and delete operations.
  • Schema validation tests: Verifies API responses against OpenAPI schema definitions.
  • Fixtures & authentication: Provides reusable fixtures and authentication scaffolding.
  • Edge cases: Includes tests for boundary values and negative scenarios.

Quick Start

Update placeholders in the templates (e.g., {ResourceName}, {resource-path}) and run the generator to produce tests under tests/api/.

Frequently Asked Questions about api-test-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate pytest tests for REST API endpoints automatically?

Generate comprehensive pytest tests automatically by extracting OpenAPI schema definitions and parameter specifications, then producing test templates with fixtures, authentication, payloads, and assertions for positive, negative, and edge-case scenarios across CRUD operations.

Can I validate API responses against OpenAPI schema definitions in my tests?

Yes. The generator creates schema validation tests that verify API responses conform to OpenAPI specifications, ensuring endpoint behavior matches documented contract and detecting schema misalignments early.

What does pytest test generation for REST APIs typically include?

Pytest test generation includes CRUD operation patterns, authentication fixtures, endpoint path scaffolding, request payload templates, response assertions, boundary value tests, and negative scenario coverage for comprehensive API validation.

How do I handle parameter validation and edge cases in API tests?

The generator extracts parameter definitions—types, required/optional flags, defaults, enums, patterns, and min/max constraints—then produces test templates covering edge cases, boundary values, and negative scenarios to validate strict parameter handling.

Do I need to manually write authentication scaffolding for API tests?

No. The generator provides reusable authentication fixtures and scaffolding built into test templates, eliminating manual setup for credential handling and allowing focus on endpoint-specific test logic.

What's the fastest way to expand test coverage for new REST API endpoints?

Use code generation to produce test templates for new endpoints by applying CRUD patterns and OpenAPI schema extraction, then update placeholders to complete tests in minutes instead of hours of manual writing.