ai-ad-test-gen

Generate pytest test cases from SoT documents and target source code.

Updated Nov 8, 2025
One-click install
npx skills add https://github.com/wade56754/AI_ad_spend02 --skill ai-ad-test-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-ad-test-gen
Source: https://github.com/wade56754/AI_ad_spend02/tree/main/.claude/skills/ai-ad-test-gen
Command: npx skills add https://github.com/wade56754/AI_ad_spend02 --skill ai-ad-test-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill generates pytest tests for backend services/routers in alignment with SoT docs, covering happy paths, boundaries, and error states.

Core Features & Use Cases

  • SoT-aligned test generation: Creates tests that reference STATE_MACHINE.md, DATA_SCHEMA.md, BUSINESS_RULES.md, and ERROR_CODES_SOT.md.
  • Test coverage templates: Outputs service/api/state_machine/ledger tests with structured test_case summaries.
  • Use Case: Given a service to test, generate a full pytest suite plus coverage notes.

Quick Start

Provide a task and target_files (tested code), and choose test_type (service/api/state_machine/ledger) to generate corresponding tests.

Frequently Asked Questions about ai-ad-test-gen

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

FAQPage Schema
How do I generate pytest tests from SoT documents for my backend service?

Generate pytest tests by providing your service code and SoT documents (STATE_MACHINE.md, DATA_SCHEMA.md, BUSINESS_RULES.md, ERROR_CODES_SOT.md). The Skill creates test cases covering happy paths, boundaries, and error scenarios with pytest fixtures and parameterization, outputting structured test files aligned to your SoT rules.

Can I automate test case creation for APIs and state machines using SoT?

Yes. Specify your test type (service, API, state machine, or ledger) and target source files. The Skill generates corresponding pytest suites with SoT-aligned test cases, input validation, naming conventions, and coverage summaries for each context.

What test scenarios does SoT-based test generation cover?

SoT-based test generation covers happy-path flows, boundary conditions, and error states. It enforces business rules from your SoT documents, applies error codes, validates state transitions, and produces pytest-compatible structures with fixtures and parameterized cases.

Do I need existing SoT documentation to use automated test generation?

Yes. Provide STATE_MACHINE.md, DATA_SCHEMA.md, BUSINESS_RULES.md, and ERROR_CODES_SOT.md as input. The Skill generates tests that reference and enforce these documents, ensuring coverage aligns with your defined states, schemas, rules, and error handling.

How does test generation handle different backend contexts like ledgers or APIs?

Select your test type during generation: service, API, state machine, or ledger. The Skill adapts test structure and scenarios to each context, applying domain-specific SoT rules and producing context-appropriate test case summaries and coverage notes.

What output does the test generation Skill produce?

The Skill outputs updated pytest test files with structured test_case summaries, coverage notes, input validation, and pytest-compatible fixtures. Generated tests enforce naming conventions and parameterization while staying compliant with SoT rules.