Importing Postman & Insomnia Collections
Aethrix can import API collections from Postman, Insomnia, and Bruno — converting them into fully executable Aethrix test automation projects. Folders become test suites, requests become test cases, and scripts are preserved with compatibility sandboxes so they can run verbatim.
How to Import
- In the Test Automation toolbar, click Import Collection (download).
- The Import Collection wizard opens with three steps.
Step 1 — Source
| Field | Description |
|---|---|
| Collection file or folder | Browse to a Postman/Insomnia file or a Bruno collection folder |
| Output folder | Where the generated .aprj project is written |
Supports Postman (.postman_collection.json), Bruno (collection folder), and Insomnia (Insomnia_*.json / .yaml).
Step 2 — Options
| Option | Description |
|---|---|
| Flatten folders into a single test suite | Ignore folder hierarchy and place all requests under one suite |
| Generate typed object models from requests (recommended) | Build typed models for best fidelity |
| OpenAPI / Swagger spec (optional) | Provide a real spec for the highest type fidelity; otherwise Aethrix infers models from requests and example responses |
Step 3 — Import
Shows a live log and a summary such as:
{0} request(s): {1} typed / {2} generic, {3} response schema(s) inferred.
When finished, choose Open Project to load the result into the workspace, or Close.
Supported Formats
| Source | Format | File Pattern |
|---|---|---|
| Postman | Collection v2.1 | *.postman_collection.json |
| Insomnia | Export v4 (JSON or YAML) | Insomnia_*.json, Insomnia_*.yaml, Insomnia_*.yml |
| Bruno | Collection directory | *.bru (folder with bru.json manifest) |
What Gets Converted
- Postman
- Insomnia
| Source Element | Aethrix Result |
|---|---|
Collection info.name | Project name |
Folders (nested item arrays) | Test suites (preserving hierarchy) |
Requests (item with request) | Test cases with Send Request steps |
request.method + request.url | HTTP method and URL |
request.header | Request headers |
request.body (raw, formdata, urlencoded, graphql) | Request body with content type |
request.auth (bearer, basic, apikey, oauth2, digest) | Authentication configuration; OAuth2 produces a pre-step |
event.listen: "prerequest" | Pre-request JavaScript step |
event.listen: "test" | Post-response JavaScript step |
Collection variable array | Default test environment variables |
{{variableName}} syntax | ${variableName} syntax |
| Source Element | Aethrix Result |
|---|---|
Workspace name + description | Project name and description |
request_group resources | Test suites (with parentId hierarchy) |
request resources | Test cases with Send Request steps |
| Headers, query parameters | Request headers and URL query params |
Body (by mimeType) | Request body |
| Authentication | Authentication configuration; OAuth2 produces a pre-step |
pre_request_script.text | Pre-request JavaScript step |
after_response_script.text | Post-response JavaScript step |
environment resources | Named test environments |
{{var}} in URLs, headers, bodies | ${var} syntax |
Script Handling
Postman and Insomnia scripts receive special treatment during import:
Structured Assertion Extraction
Common assertion patterns are detected and converted into native Aethrix assertion steps attached to the Send Request step:
- Postman Patterns
- Insomnia Patterns
| Script Pattern | Extracted Assertion |
|---|---|
pm.response.to.have.status(200) | HttpStatusCode equals |
pm.expect(pm.response.code).to.equal(200) | HttpStatusCode equals |
pm.response.to.have.header("Name") | Header exists |
pm.response.to.have.header("Name", "Value") | Header equals |
pm.expect(json.path).to.eql(value) | JsonPath equals |
pm.expect(body).to.include("text") | Body contains |
pm.expect(json.field).to.exist | JsonPath exists |
Insomnia uses the same assertion library as Postman. API calls (insomnia.response, insomnia.environment, etc.) are rewritten to Postman equivalents during analysis, and the same extraction patterns apply.
Variable Extraction
pm.environment.set("key", expr) and pm.collectionVariables.set("key", expr) calls are detected. When the expression is a simple .json().field access, a Data Transfer step is created to extract the JSON path value into the named variable.
Remaining Script Content
Script lines that do not match a known detection pattern remain as raw JavaScript in a JavaScript Test Step. At runtime, these scripts execute against the pm or insomnia compatibility sandboxes, which provide the expected API surface.
Variable Translation
Postman/Bruno-style {{variableName}} syntax is automatically converted to Aethrix ${variableName} syntax in URLs, headers, bodies, and script content.
Compatibility Sandboxes
At runtime, every JavaScript test step has access to three sandbox objects:
| Object | Source | Purpose |
|---|---|---|
aethrix | Native | Use for new scripts — full Aethrix assertion API |
pm | Postman | Postman-compatible API for imported collection scripts |
insomnia | Insomnia | Insomnia-compatible API for imported collection scripts |
The pm and insomnia sandboxes are compatibility layers — they allow imported scripts to execute without modification. For new scripts, prefer aethrix.*.
See the JavaScript API Reference for the complete API surface.
Limitations
- Only Postman Collection v2.1 format is supported (not v1 or v2.0)
- Only Insomnia v4 export format is supported
- Complex scripts using dynamic property access or non-standard patterns may not produce structured assertions — they execute verbatim but assertions won't appear as separate steps
- Postman
collectionVariablesmap to Aethrix environment variables (not a separate scope) - Bruno assertion extraction is limited to
res.status,res.headers, andres.bodypatterns
Importing cURL Commands
In addition to collections, you can paste a raw cURL command:
- In the API Playground toolbar, click Import cURL.
- The Import cURL window (
ImportCurlWindow) opens with a multi-line text area. Paste the full command, e.g.curl -X POST https://api.example.com/v1/users -H "Content-Type: application/json" -d '{"name":"Ada"}'. - Click Import — Aethrix parses method, URL, headers, and body (including
--data-rawand--headervariants) and creates a new request under Imported cURL Requests.
:::info Screenshot needed — light/dark 📸
import-curl-window-light.png and import-curl-window-dark.png — Import cURL window with pasted command and parsed preview
:::