{
 "schema": "aiblocks-page/1",
 "id": "agency-testing-api-tester",
 "type": "agent",
 "name": "API test planner",
 "summary": "Turn your API spec into a test plan with edge cases, auth checks and failure cases, plus starter test code to run on a test server.",
 "headline": "API test planner",
 "subhead": "Paste your endpoint list or OpenAPI spec, how login works and a sample request and reply. It writes the test cases, the expected results and the failure checks, and gives starter code to run against a test environment you control.",
 "job": {
  "id": "test-and-fix-code",
  "name": "Test and fix code"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "api_spec",
   "required": true,
   "label": "Api spec",
   "what": "an API's spec, such as an OpenAPI file: the endpoints, data shapes, sign-in method and errors"
  },
  {
   "type": "source_text",
   "required": false,
   "label": "Source text",
   "what": "a long source in full: an article, a video or talk transcript, or notes from a book, with its title, author and link"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "code_change",
   "required": true,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "The API spec or a list of endpoints with method and path, pasted as text (OpenAPI is best)",
  "How login works, such as a bearer token, and what roles exist",
  "A sample request and reply for one or two endpoints",
  "The expected status codes and error format (optional)",
  "The test environment address and your test tool, such as Playwright or Postman (optional)"
 ],
 "you_get": [
  "A list of the endpoints, with which are risky and why",
  "Test cases for each endpoint, with the expected status code and body",
  "Auth and access cases, such as no token, wrong role and another user's data",
  "Edge cases and failure cases, such as bad input, empty lists, limits and a failing dependency",
  "Starter test code you adapt and run, marked as not run",
  "Open questions, where the spec does not say what should happen"
 ],
 "use_when": [
  "You are about to ship a new API or a change to one, and want a test plan before launch.",
  "A partner will call your API, and you want to know it handles bad input and failures well.",
  "You have a spec or Postman collection but no tests, and need a place to start.",
  "A bug report says \"it returned 500\", and you want the cases around it written down."
 ],
 "skip_when": [
  "You want a real load test with traffic at scale. Use the Performance benchmark planner.",
  "You want a deep security test or attack simulation. Use the Penetration test planner, and only with written permission.",
  "You want to test a screen or a button in a web app. Use the Test Automation Engineer agent.",
  "You only have a public third-party API you do not control. Do not run stress or injection tests on it. Test your own code that calls it."
 ],
 "output_sample": {
  "input": [
   "The API spec or a list of endpoints, as text",
   "How login works and which roles exist",
   "A sample request and reply for one or two endpoints",
   "Expected status codes and your test tool (optional)"
  ],
  "prerequisites": [
   "A test environment you own, with a test account",
   "A test tool such as Playwright or Postman, to run the cases"
  ],
  "output": [
   {
    "name": "API and scope",
    "contains": "What is under test, the test address, the login method and what is missing."
   },
   {
    "name": "Endpoints",
    "contains": "Each endpoint with purpose, who may call it, whether it changes data and its risk."
   },
   {
    "name": "Test cases",
    "contains": "Valid, invalid, edge, auth and failure cases, each with request and expected result."
   },
   {
    "name": "Starter code",
    "contains": "Test code to adapt, with no secrets inside, marked as not run."
   },
   {
    "name": "Open questions",
    "contains": "Where the spec is silent on what should happen, and why it matters."
   },
   {
    "name": "Report to fill after the run",
    "contains": "A layout for pass, fail and not run counts, issues and a go or no-go call."
   }
  ]
 },
 "output_shape": "API AND SCOPE\n  name <API> | environment <test address> | login <method> | ASSUMED: <list> | MISSING: <list>\n\nENDPOINTS\n  <method and path> | purpose | who may call | changes data <yes or no> | risk <low, medium, high>\n\nTEST CASES\n  <endpoint> | <case name> | type <valid, invalid, edge, auth, failure> | request <what to send> | expected <status and body> | status NOT RUN\n\nSTARTER CODE\n  <file name> | <code> | NOT RUN, adapt before use\n\nOPEN QUESTIONS\n  <what the spec does not say> | why it matters\n\nREPORT TO FILL AFTER THE RUN\n  pass <count> | fail <count> | not run <count> | issues <list> | release call <go or no-go, with reasons>",
 "how_to_use": [
  "Download the pack from this page and add it to your AI as a skill. Or paste SKILL.md into a new chat, then paste references/source-agent.md after it.",
  "Paste your spec or endpoint list, the login method and one sample request and reply. Remove real keys, passwords and customer data first.",
  "Read the open questions. Answer them, or write down the answer your team wants, so each test has a clear expected result.",
  "Ask for starter code in the tool you use. Set the test address, test login and keys in settings, not in the code.",
  "Run the tests on a test environment you own, never on production. Paste back any failures and ask for the cause.",
  "Add the passing tests to your build pipeline, so they run on every change."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "Code change reviewer",
   "url": "https://useaiblocks.com/skills/code-change-reviewer",
   "why": "Code change reviewer"
  },
  {
   "name": "API test suite builder",
   "url": "https://useaiblocks.com/skills/api-test-suite-builder",
   "why": "API test suite builder"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/testing/testing-api-tester.md",
  "licence": "MIT",
  "original_name": "API Tester",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "API Tester",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/testing/testing-api-tester.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-testing-api-tester",
  "markdown": "https://useaiblocks.com/agents/agency-testing-api-tester.md",
  "json": "https://useaiblocks.com/agents/agency-testing-api-tester.json",
  "instructions": "https://useaiblocks.com/skills/agency-testing-api-tester/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-testing-api-tester.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-testing-api-tester",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-testing-api-tester",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
