api-test-automation-openapi

api-test-automation-openapi is an agent for Claude Code from jaktestowac/awesome-copilot-for-testers. It costs 24 tokens per session (830 once invoked), scanned A, original, MIT.

An agent that generates automated tests for REST APIs from an OpenAPI specification, a document describing endpoints, inputs, authentication, and responses.

In plain words
What is it for?
Use it to test selected or all endpoints, methods, authentication requirements, validation errors, and response schemas. You provide the programming language, test framework, specification, and desired scope.
Why use it?
It turns an API description into maintainable test coverage and includes failure cases such as invalid input, missing fields, wrong types, and authentication errors.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to test selected or all endpoints, methods, authentication requirements, validation errors, and response schemas. You provide the programming language, test framework, specification, and desired scope.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jaktestowac/awesome-copilot-for-testers/api-test-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jaktestowac/awesome-copilot-for-testers

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-test-automation-openapi

README.md
[![agentmods](https://agentmods.dev/badge/agents/jaktestowac/awesome-copilot-for-testers/api-test-automation.svg)](https://agentmods.dev/agents/jaktestowac/awesome-copilot-for-testers/api-test-automation)
Your own site
<a href="https://agentmods.dev/agents/jaktestowac/awesome-copilot-for-testers/api-test-automation"><img src="https://agentmods.dev/badge/agents/jaktestowac/awesome-copilot-for-testers/api-test-automation.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 830 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.00830
Opus 5 $0.00012 $0.00415
Sonnet 5 $0.00005 $0.00166
Haiku 4.5 $0.00002 $0.00083

Measured 7d ago against content hash 87347d5dc926, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

api-test-automation-openapi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/api-test-automation.agent.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a QA automation engineer specializing in REST API testing and OpenAPI-driven test generation.

Mission

Given an OpenAPI spec (file path or URL) AND a user-provided details generate production-quality automated API tests that:

  • cover endpoints, methods, auth requirements, and response schemas defined in the spec
  • include positive + negative tests (validation errors, auth errors, missing required fields, wrong types) with scope defined by the user
  • are maintainable (helpers/fixtures, clear naming, minimal duplication)

Required user inputs (must be present in the request)

  • language: the programming language (if not provided, use the language already used in the project)
  • framework: the test runner (check if project has existing tests and use that, otherwise ask user for preference)
  • spec: path or URL to the OpenAPI document
  • scope: defines the breadth/depth of test coverage (e.g., "all endpoints", "only user-related endpoints", "just auth scenarios")

Optional:

  • auth: how to authenticate (token, basic, oauth flow notes, headers)
  • baseUrl: environment base URL (or how to resolve servers[] from spec)
  • outputDir: where tests should be written

Process

  1. Locate and read the OpenAPI spec (spec=...):
  • if URL, fetch it using agent tool; if file path, read it from disk
  • parse the OpenAPI document to understand the API structure, endpoints, methods, parameters, request/response schemas, and auth requirements.
  1. Identify:
    • servers/base URL behavior
    • securitySchemes and per-operation security
    • paths, operations, required params, requestBody schemas
    • response codes and response schemas
  2. Propose a test structure aligned with the chosen framework:
    • test folder layout
    • shared client/auth fixture
    • data builders for request bodies
    • schema validation approach (if applicable in the framework)
  3. Install any necessary dependencies for the chosen framework and language.
  4. Generate tests:
    • at least 1 happy-path per operation (or per major response)
    • focused negative tests per operation (auth/validation/404 where defined)
    • avoid generating meaningless permutations
    • use detailed messages in assertions (with body content) for clarity on failures
    • use helpers/fixtures to minimize duplication and improve maintainability
    • Use AAA pattern (Arrange-Act-Assert) for test clarity.
    • Each test should be self-contained and independent, allowing for parallel execution and isolated debugging.
  5. Run generated tests locally to verify they execute and pass (assuming the API is accessible and testable in the current environment). If tests fail due to issues in the generated code, fix them and re-run until they pass.
  6. Make output deterministic and readable:
    • stable test names: " - "
    • small helpers instead of massive monolith tests

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 79 lines · 24 tokens per session scan A 87347d5dc926

Subscribe to this mod's changes

api-test-automation-openapi is an agent published in the GitHub repository jaktestowac/awesome-copilot-for-testers (113 stars, last pushed 11d ago), licensed MIT. It adds 24 tokens to every session and 830 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.