ai-ad-api-automation-test

Generate and run pytest and Newman API contract tests for AI Ad Spend services.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill orchestrates API automation tests, generating pytest tests per AUTOMATION_TEST_SPEC_v1.4 and integrating Newman for contract testing, all aligned with SoT docs.

Core Features & Use Cases

  • pytest generation & Newman integration: End-to-end API test automation.
  • SoT alignment: Tests reference STATE_MACHINE.md, API_SOT.md, ERROR_CODES_SOT.md, and LEDGER_SOT.md.
  • Use Case: Generate L2 API tests for a given endpoint and run via pytest or Newman.

Quick Start

Provide mode (GENERATE/RUN/NEWMAN/REPORT) and target_module; follow with test_level and output_dir to receive structured tests and reports.

Frequently Asked Questions about ai-ad-api-automation-test

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

FAQPage Schema
How do I automate API contract testing with pytest and Newman?โ–ผ

API contract testing automates validation of API endpoints against specifications. This Skill generates pytest tests conforming to AUTOMATION_TEST_SPEC_v1.4 and integrates Newman for Postman-based contract tests, executing both across your API modules to ensure compliance with documented contracts.

What does SoT alignment mean for API tests?โ–ผ

SoT (Source of Truth) alignment ensures your API tests reference authoritative documentation: STATE_MACHINE.md, API_SOT.md, ERROR_CODES_SOT.md, and LEDGER_SOT.md. This Skill generates tests that conform to these sources, reducing drift between tests and live API behavior.

Can I generate and run API tests for specific modules?โ–ผ

Yes. Specify the target module (daily_report, ledger, auth, topup, or others), test level, and mode (GENERATE, RUN, NEWMAN, or REPORT). The Skill generates pytest tests or Newman contracts for that module and executes them, producing test artifacts and structured reports.

What input contract fields do I need to provide?โ–ผ

Required inputs include mode, target_module, and test_level. Optional fields include collection_path and environment_path for Newman tests, output_format, dry_run, output_dir, and overwrite. The Skill validates all inputs against safety constraints before test generation or execution.

Does this Skill support dry-run testing?โ–ผ

Yes. Set dry_run to preview test generation and execution plans without modifying outputs. This lets you validate input parameters, module targeting, and test configuration before committing to full test runs.

What output formats and reports does this Skill produce?โ–ผ

The Skill generates pytest test files, Newman contract test results, and structured reports in your specified output_format. REPORT mode aggregates test execution results into a single output artifact for compliance and audit trails.