postman/rest-assured-postman-mastra
- Visibility
- public
- Deploys
- 0
- Build Number
- 8ef399dc
- Updated
- Sep 3, 2026
Overview
This agent turns a Java API-test suite (REST Assured on JUnit/TestNG) into a runnable Postman Collection. It runs a Mastra coordinator agent that resolves shared config once and fans each enumerated test unit out to a focused worker agent, then assembles one Collection v2.1 document and publishes it to Postman with a single API call.
The design is deterministic on both ends with one agentic step in the middle: unzip and enumerate the tests (plain code) → the agent reads the project and writes one collection JSON (its only side effect) → validate and publish (plain code).
Usage
Async (a conversion runs for minutes, longer than a gateway request timeout):
POST /api/workspaces/:workspaceId/convert (multipart/form-data) → 202 { jobId }
file(form field, required): the zipped Maven/Gradle project.collectionName(form field or?collectionName=, optional): overrides the generated name.X-Postman-Api-Key(header, required): authenticates the caller (resolved viaGET /me) AND is used to publish. Required on/api/jobs/:jobIdpolls too.X-Anthropic-Api-Key(header, optional): overrides the platform-injectedANTHROPIC_API_KEY.
The whole /api/* surface is authenticated by the caller's Postman API key: the agent
resolves it via GET /me and authorizes only users whose team is on the allow-list
(ALLOWED_TEAM_IDS in src/auth.ts) — invalid key → 401, non-allow-listed team →
403. Decisions are cached briefly so polling doesn't call /me each time. /health
and the embedded demo mock stay public.
Then poll GET /api/jobs/:jobId until status is succeeded (with collectionUid,
postmanUrl, testsConverted, testsTotal, unitsEnumerated, unitsConverted,
testMethodsEnumerated, requestsConverted, and optionally mockUrl/mockId/
mockCreationError when the source had mock-stub units) or failed (with error).
The platform injects ANTHROPIC_API_KEY (via the anthropic model provider). MODEL,
CONVERT_TIMEOUT_MS, and ENABLE_SHELL_TOOL are optional inputs with safe defaults.
Limitations
- Local runtime only: the agent converts the project inside its own container.
testsTotalis the agent's self-reported count;testsConvertedis computed deterministically from the artifact and is the source of truth.- The bundled demo mock answers only specific demo paths; a customer's real target APIs are unaffected.
- The
shelltool is disabled by default (the uploaded project is untrusted). - Mock-server creation only covers endpoints the project already explicitly stubbed with WireMock — it does not synthesize responses for real REST Assured test endpoints — and only fires when the whole conversion published as a single collection (no sharding).
- Visibility
- public
- Deploys
- 0
- Build Number
- 8ef399dc
- Updated
- Sep 3, 2026