Astro
rest-assured-postman-mastra

rest-assured-postman-mastra

testingmigrationpostmanjava
Details
Visibility
public
Deploys
0
Build Number
b20d57f0
Updated
Jul 30, 2026
Contributors
Integrations
PostmanAnthropic
Capabilities
Accepts a multipart upload of a zipped Maven/Gradle REST Assured project and returns a published Pos
Uses a per-test-class worker agent fan-out to translate JUnit/TestNG REST Assured tests, including a
Resolves base URLs / auth / secrets from property files and helpers into Postman collection variable
Publishes deterministically via a single Postman API POST; the agent never publishes
More blueprints
AGENT.md

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): the Postman key used to publish (per request, never stored).
  • X-Anthropic-Api-Key (header, optional): overrides the platform-injected ANTHROPIC_API_KEY.

Then poll GET /api/jobs/:jobId until status is succeeded (with collectionUid, postmanUrl, testsConverted, testsTotal, unitsEnumerated, unitsConverted, testMethodsEnumerated, requestsConverted) 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.
  • testsTotal is the agent's self-reported count; testsConverted is 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 shell tool is disabled by default (the uploaded project is untrusted).