api-test-generator
Skill1 starsChanged 28 days agoMITView on GitHub
Generate API test cases and runnable tests (pytest+requests, REST Assured, Playwright request, Postman/Newman) from an OpenAPI spec or endpoint description, plus consumer-driven contract tests with Pact.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nek1987/auto-agent-harness★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- accessibility-auditSkill
- automation-code-reviewSkill
- bug-report-writerSkill
- ci-cd-and-test-dataSkill
- device-cloud-setupSkill
- flaky-test-triageSkill
- framework-scaffolderSkill
- greenbuild-getting-startedSkill
- llm-app-testingSkill
- mobile-automationSkill
- performance-test-starterSkill
- regression-health-digestSkill
- release-readiness-checklistSkill
- test-plan-from-requirementsSkill
- tools-and-librariesSkill
- visual-testingSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Never put real tokens or production URLs in code.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API test generation
- Get the spec (OpenAPI, Postman collection, or curl samples) and the team's framework from memory.
- Cases per endpoint:
- happy path
- required vs optional fields
- type, format and boundary checks
- auth: missing, invalid, expired, wrong role
- 404/409 responses
- idempotency
- pagination and filters
- response schema/contract checks Prioritize by risk (writes, auth, money), and show the table before writing code.
- pytest + requests:
import os, uuid, requests
BASE = os.environ["BASE_URL"]
def test_create_user(auth_headers):
body = {"email": f"qa+{uuid.uuid4().hex[:8]}@example.com"}
r = requests.post(f"{BASE}/users", json=body, headers=auth_headers, timeout=10)
assert r.status_code == 201
assert r.json()["email"] == body["email"]Validate the schema with jsonschema or pydantic, and clean up the data you created in fixtures. 4. REST Assured (Java):
given().baseUri(System.getenv("BASE_URL")).auth().oauth2(token)
.contentType(ContentType.JSON).body(payload)
.when().post("/users")
.then().statusCode(201).body("email", equalTo(email))
.body(matchesJsonSchemaInClasspath("user.json"));- Postman/Newman in CI:
npm i -g newman, thennewman run collection.json -e staging.json --reporters cli,junit --reporter-junit-export results.xml. Keep tests in the collection's Tests tab (pm.test,pm.expect). Keep env secrets out of git. - Contract testing with Pact (consumer-driven):
- The consumer test defines its interactions against the Pact mock server (
@pact-foundation/pactfor JS,pact-pythonv3 for Python,au.com.dius.pactfor JVM), which writes a pact JSON file. - Publish to a Pact Broker or PactFlow, and the provider verifies against it in its own CI.
- Gate deploys with
pact-broker can-i-deploy --pacticipant <app> --version <sha> --to-environment production. - Contracts test the shape and expectations the consumer depends on, not business logic.
- The consumer test defines its interactions against the Pact mock server (
- Never put real tokens or production URLs in code. Give the run command, and state that the code was not executed unless you actually ran it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

