{"id":13474107,"url":"https://github.com/grafana/postman-to-k6","last_synced_at":"2026-01-15T00:49:24.239Z","repository":{"id":44681288,"uuid":"91872205","full_name":"grafana/postman-to-k6","owner":"grafana","description":"Converts Postman collections to k6 script code","archived":true,"fork":false,"pushed_at":"2021-11-22T16:40:32.000Z","size":1478,"stargazers_count":296,"open_issues_count":13,"forks_count":50,"subscribers_count":152,"default_branch":"master","last_synced_at":"2025-10-20T08:40:30.907Z","etag":null,"topics":["k6","k6-converter","load-testing","performance-testing","postman","postman-collection"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-20T07:15:44.000Z","updated_at":"2025-10-14T17:50:40.000Z","dependencies_parsed_at":"2022-09-16T12:22:56.573Z","dependency_job_id":null,"html_url":"https://github.com/grafana/postman-to-k6","commit_stats":null,"previous_names":["loadimpact/postman-to-k6"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/grafana/postman-to-k6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpostman-to-k6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpostman-to-k6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpostman-to-k6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpostman-to-k6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/postman-to-k6/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fpostman-to-k6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28440496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["k6","k6-converter","load-testing","performance-testing","postman","postman-collection"],"created_at":"2024-07-31T16:01:09.578Z","updated_at":"2026-01-15T00:49:24.225Z","avatar_url":"https://github.com/grafana.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Tools"],"sub_categories":[],"readme":"\n\u003e ### ⚠ ️ This project is no longer maintained in this repository. \n\u003e \n\u003e Development and maintenance have been stopped in this repository. \n\u003e \n\u003e A fork of this project is active and maintained at [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6).\n\n# Postman-to-k6\n\nConverts a [Postman collection](https://www.getpostman.com/docs/collections) to a [k6 script](https://docs.k6.io/docs).\n\n## Content\n\n- [Features](#features)\n- [Installation](#installation)\n  - [Local Installation (recommended)](#local-installation-recommended)\n  - [Global Installation](#global-installation)\n  - [Docker](#docker)\n- [Usage](#usage)\n- [Options](#options)\n  - [Iterations](#iterations)\n  - [Environment Variables](#environment-variables)\n  - [Global Variables](#global-variables)\n  - [CSV Data File](#csv-data-file)\n  - [JSON Data File](#json-data-file)\n  - [Separate](#separate)\n- [Docker Usage](#docker-usage)\n- [Examples](#examples)\n- [Unsupported Features](#unsupported-features)\n- [Other similar tools](#other-similar-tools)\n- [Credits](#credits)\n\n## Features\n\n- Prerequest scripts.\n- Test scripts.\n- Variables (at all scopes + dynamic).\n- Data files.\n- Authentication methods (except Hawk).\n- File uploads.\n- `postman.*` interface ([exceptions below](#unsupported-features)).\n- `pm.*` interface ([exceptions below](#unsupported-features)).\n- Global variables exposed by Postman: `globals` `environment` `data`\n  `iteration`.\n- `xml2Json` conversion.\n- All [Postman Schema](https://schema.getpostman.com/) versions.\n\n## Installation\n\n### Local Installation (recommended)\n\nWhile possible to install globally, we recommend that you, if possible, add the converter to the `node_modules` of your test project using:\n\n```shell\n$ npm install -D postman-to-k6\n\n# or using yarn...\n\n$ yarn add postman-to-k6\n```\n\nNote that this will require you to run the converter with `npx postman-to-k6 your-postman-file` or, if you are using an older versions of npm, `./node_modules/.bin/postman-to-k6 your-postman-file`.\n\n### Global Installation\n\n```shell\n$ npm install -g postman-to-k6\n```\n\n### Docker\n\nThe tool is also available for usage in Docker. To download an image with the tool from DockerHub:\n\n```shell\n$ docker pull loadimpact/postman-to-k6\n\n```\n\n## Usage\n\nTo convert an exported collection to a k6 script:\n\n```shell\n$ postman-to-k6 collection.json -o k6-script.js\n```\n\nThen run the script in k6, as usual, using:\n\n```shell\n$ k6 run k6-script.js\n```\n\n## Options\n\n### Iterations\n\nConfigures how many times the script will be executed before completion.\n\n| Flag | Verbose        | Default |\n| ---- | -------------- | ------: |\n| `-i` | `--iterations` |       1 |\n\nExample:\n\n```shell\n$ postman-to-k6 collection.json --iterations 25 -o k6-script.js\n```\n\n### Environment Variables\n\nProvide environment variables from a JSON file.\n\n| Flag | Verbose         | Default |\n| ---- | --------------- | ------- |\n| `-e` | `--environment` | N/A     |\n\nExample:\n\n```shell\n$ postman-to-k6 collection.json --environment environment.json -o k6-script.js\n```\n\n### Global Variables\n\nProvide global variables from a JSON file.\n\n| Flag | Verbose    | Default |\n| ---- | ---------- | ------- |\n| `-g` | `--global` | N/A     |\n\n```shell\n$ postman-to-k6 collection.json --global globals.json -o k6-script.js\n```\n\n### CSV Data File\n\nProvide a data file in the CSV format.\n\n| Flag | Verbose | Default |\n| ---- | ------- | ------- |\n| `-c` | `--csv` | N/A     |\n\n```shell\n$ postman-to-k6 collection.json --csv data.csv -o k6-script.js\n```\n\n### JSON Data File\n\nPass in a data file in the JSON format.\n\n| Flag | Verbose  | Default |\n| ---- | -------- | ------- |\n| `-j` | `--json` | N/A     |\n\n```shell\n$ postman-to-k6 collection.json --json data.json -o k6-script.js\n```\n\n### K6 Param Options File\n\nPass [K6 parameter options](https://k6.io/docs/javascript-api/k6-http/params) as a file in JSON format.\n\n| Flag | Verbose       | Default |\n| ---- | ------------- | ------- |\n|      | `--k6-params` | N/A     |\n\n```shell\n$ postman-to-k6 collection.json --k6-params k6-params.json -o k6-script.js\n```\n\n### Separate\n\nSplit requests into separate files, for easier rearrangement of the logic.\n\n| Flag | Verbose      | Default |\n| ---- | ------------ | ------- |\n| `-s` | `--separate` | false   |\n\n```shell\n$ postman-to-k6 collection.json --separate -o k6-script.js\n```\n\n```shell\npostman-to-k6 collection.json -s -o k6-script.js\n```\n\n### Skip Pre\n\nSkips any pre-request scripts during conversion\n\n| Flag | Verbose      | Default |\n| ---- | ------------ | ------- |\n|      | `--skip-pre` | false   |\n\n```shell\n$ postman-to-k6 collection.json --skip-pre -o k6-script.js\n```\n\n### Skip Post\n\nSkips any post-request scripts during conversion\n\n| Flag | Verbose       | Default |\n| ---- | ------------- | ------- |\n|      | `--skip-post` | false   |\n\n```shell\n$ postman-to-k6 collection.json --skip-pre -o k6-script.js\n```\n\n## Docker Usage\n\nUsing the Docker image, you execute the tool as follows:\n\n```shell\n$ docker run -it \\\n    -v \"/path/to/postman/collection/:/postman/\" \\\n    loadimpact/postman-to-k6 \\\n    /postman/my-collection.json \\\n    -o /postman/test.js\n```\n\nand then execute the k6 test using:\n\n```shell\n$ k6 run /path/to/postman/collection/test.js\n```\n\n## Examples\n\nA collection of Postman examples are located under `example`.\nTo run one of the examples, just run it as you would any other command:\n\n```shell\n$ postman-to-k6 example/v2/echo.json -o k6-script.js\n```\n\n## Unsupported Features\n\n- Sending requests from scripts using `pm.sendRequest`.\n- Controlling request execution order using `postman.setNextRequest`.\n- Cookie properties, like `hostOnly`, `session`, and `storeId`.\n- Textual response messages:\n  - `responseCode.name`\n  - `responseCode.detail`\n  - `pm.response.reason`\n  - `pm.response.to.have.status(reason)`\n  - `pm.response.to.not.have.status(reason)`\n- Properties returning Postman classes:\n  - `pm.request.url` `pm.request.headers`\n  - `pm.response.headers`\n- The Hawk authentication method.\n- Deprecated `xmlToJson` method.\n- Request IDs are changed. Postman doesn't provide them in the export so we\n  have to generate new ones.\n\n## Other similar tools\n\n- [jmeter-to-k6](https://github.com/loadimpact/jmeter-to-k6/): Convert\n  JMeter JMX files to k6 JS.\n\n## Credits\n\nThanks to [bookmoons](https://github.com/bookmoons) for creating this tool. Also, thanks to [borjacampina](https://github.com/borjacampina) for creating the original incarnation of the tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fpostman-to-k6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fpostman-to-k6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fpostman-to-k6/lists"}