api-tester

Generate and execute pytest suites from OpenAPI specs for REST APIs.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/mk-knight23/AI-Agent-Nanobot --skill api-tester-mk-knight23
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-tester
Source: https://github.com/mk-knight23/AI-Agent-Nanobot/tree/main/skills/api-tester
Command: npx skills add https://github.com/mk-knight23/AI-Agent-Nanobot --skill api-tester-mk-knight23

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces the manual effort of writing comprehensive API tests by automatically generating, executing, and reporting pytest suites from an OpenAPI specification so teams can validate endpoints quickly against a running server or mock.

Core Features & Use Cases

  • Spec parsing and discovery: Reads OpenAPI YAML or JSON (local or remote) and enumerates operations and schemas.
  • Parametric test generation: Produces pytest files per tag with happy-path, missing-required, invalid-type, and auth-missing cases derived from required fields, enums, and validation rules.
  • Automated execution and reporting: Runs tests with pytest and an httpx async client, then writes API_TEST_REPORT.md with pass/fail, timing percentiles, and failure details. Use this for CI validation, local integration testing, or validating mock servers before deployment.

Quick Start

Point Nanobot at your OpenAPI spec and a base URL to generate and run pytest tests and produce an API_TEST_REPORT.md.

Frequently Asked Questions about api-tester

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

FAQPage Schema
How do I auto-generate pytest tests from an OpenAPI spec?

To generate pytest tests from an OpenAPI spec, parse the YAML or JSON file to discover operations and schemas, then produce parametric success, error, and edge-case tests using pytest and an httpx async client against a live base URL.

Can I validate API endpoints against a mock server using pytest?

Yes, you can validate API endpoints against a mock server using pytest by directing the test generation process at the mock base URL, executing automated HTTP requests to verify endpoint behavior, and outputting the results into an API_TEST_REPORT.md file.

What do I need to run automated OpenAPI test suites and generate reports?

To run OpenAPI test suites and generate reports, you need a valid OpenAPI YAML or JSON spec, a reachable base URL, and a Python environment configured with pytest and an httpx async client to execute tests and write the API_TEST_REPORT.md.

What types of API test cases are generated from OpenAPI validation rules?

API test cases generated from OpenAPI validation rules include happy-path scenarios, missing-required field errors, invalid-type errors, and auth-missing cases derived from the required fields, enums, and validation rules defined in the specification.

Does automated pytest execution report API timing percentiles and failure details?

Automated pytest execution reports API timing percentiles and failure details by running generated test suites with an httpx async client and writing the pass/fail status, timing metrics, and specific failure information into an API_TEST_REPORT.md file.

When should I use OpenAPI-generated test suites for API validation?

You should use OpenAPI-generated test suites for API validation during CI integration validation, local integration testing, or validating mock servers before deployment to quickly ensure endpoints meet specifications without manually writing tests.