Convert a Postman collection into Vera API tests

A Postman collection describes API calls, so it converts into Vera api-request steps rather than clicks. Each request keeps its method, URL, headers and body, and Postman’s {{variable}} syntax is the same as Vera’s, so placeholders carry through unchanged. The result is backend checks you can run on their own or thread into a browser test.

What comes across

  • Each top-level folder becomes one test by default, or the whole collection one combined test if you choose; each request becomes an api-request step.
  • Postman's {{variable}} syntax is identical to Vera's, so placeholders in URLs, headers and bodies carry through verbatim.
  • A leading {{base_url}}-style variable is stripped from request URLs, so the project base URL (or a named environment) applies.
  • Collection variables can be added to the project variables, keeping any existing values.
  • Bearer-token and header API-key auth are carried onto each request, including auth inherited from a folder.
  • A pm.response.to.have.status(…) check in the test script becomes the step’s expected status.
  • pm.environment.set(…)-style assignments whose value is a plain path into the response JSON become extracted variables that later steps can use.

What does not

  • Pre-request scripts and test-script logic beyond a status check are not executed. Variable assignments computed by script logic are named in a warning and not imported.
  • Basic auth is not imported per request; configure it once on the project instead.
  • API-key auth sent in the query string is not imported; add it to the URL by hand.
  • Only raw and URL-encoded bodies are imported; other body modes, such as form-data, are omitted with a warning.
  • Only GET, POST, PUT, PATCH and DELETE requests are imported; others are skipped with a warning.
  • An import adds to the project rather than replacing what is there, so importing the same file twice gives two copies.

How to set it up

  1. Open a project's Tests page and choose Import tests, then pick your exported collection (.json). The format is detected from each file.
  2. Choose how to group it: one test per folder, or one combined test.
  3. Decide whether to add the collection variables to the project variables.
  4. Read the warnings and the unresolved count before trusting the test count: they name every statement that was not converted.
  5. Or convert from the repository: npx vera-agent init --import postman finds the specs and uploads them through the CI API, which needs Pro or above on Vera's cloud (self-hosted installs include it). The dashboard import works on every plan.

Questions

Can I turn a Postman collection into end-to-end tests?

Into API tests, yes: each request becomes an api-request step with its method, URL, headers, body and status check. A collection describes API calls, not clicks, so it does not become a browser journey on its own.

Do Postman variables still work after import?

Yes. Postman's {{variable}} syntax is identical to Vera's, so placeholders carry through unchanged, and collection variables can be added to the project variables.

Are Postman pre-request scripts run?

No. Script logic is not executed. A status check and variables set from a plain path into the response are converted; anything computed by script is reported as not imported.

Read more

Start free