All Projects → grafana → postman-to-k6

grafana / postman-to-k6

Licence: Apache-2.0 license
Converts Postman collections to k6 script code

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to postman-to-k6

Postman To K6
Converts Postman collections to k6 script code
Stars: ✭ 180 (-33.09%)
Mutual labels:  load-testing, postman, performance-testing, postman-collection
jmeter-to-k6
Converts JMeter .jmx files to k6 JS code
Stars: ✭ 57 (-78.81%)
Mutual labels:  load-testing, performance-testing, k6, k6-converter
k6-template-es6
Template repository for bundling test projects into single test scripts runnable by k6
Stars: ✭ 39 (-85.5%)
Mutual labels:  load-testing, performance-testing, k6
k6-action
k6 is now available as a GitHub Action
Stars: ✭ 64 (-76.21%)
Mutual labels:  load-testing, performance-testing, k6
k6-template-typescript
Template to use TypeScript with k6
Stars: ✭ 90 (-66.54%)
Mutual labels:  load-testing, performance-testing, k6
pmpact
A command line tool to convert Pact files to Postman collections.
Stars: ✭ 15 (-94.42%)
Mutual labels:  postman, postman-collection
Jmeter Maven Plugin
The JMeter Maven Plugin
Stars: ✭ 362 (+34.57%)
Mutual labels:  load-testing, performance-testing
k6-example-data-generation
Example repository showing how to utilise k6 and faker to load test using generated data
Stars: ✭ 32 (-88.1%)
Mutual labels:  load-testing, performance-testing
Gatling Dubbo
A gatling plugin for running load tests on Apache Dubbo(https://github.com/apache/incubator-dubbo) and other java ecosystem.
Stars: ✭ 131 (-51.3%)
Mutual labels:  load-testing, performance-testing
Pewpew
Flexible HTTP command line stress tester for websites and web services
Stars: ✭ 269 (+0%)
Mutual labels:  load-testing, performance-testing
Awesome Test Automation
A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by http://sdclabs.com
Stars: ✭ 4,712 (+1651.67%)
Mutual labels:  load-testing, performance-testing
Shadowreader
Serverless load testing for replaying website traffic. Powered by AWS Lambda.
Stars: ✭ 138 (-48.7%)
Mutual labels:  load-testing, performance-testing
Nbomber
Modern and flexible load testing framework for Pull and Push scenarios, designed to test any system regardless a protocol (HTTP/WebSockets/AMQP etc) or a semantic model (Pull/Push).
Stars: ✭ 354 (+31.6%)
Mutual labels:  load-testing, performance-testing
Locust
Scalable user load testing tool written in Python
Stars: ✭ 17,763 (+6503.35%)
Mutual labels:  load-testing, performance-testing
Awesome Jmeter
A collection of resources covering different aspects of JMeter usage.
Stars: ✭ 413 (+53.53%)
Mutual labels:  load-testing, performance-testing
Performance Testing Framework
Framework allows to perform load testing with Apache Jmeter, view application/server metrics in real-time with Grafana, analyze errors cause with detailed traces for failed requests, compare different test runs in scripted dashboard and perform frontend performance testing with sitespeed.io+webpagetest
Stars: ✭ 275 (+2.23%)
Mutual labels:  load-testing, performance-testing
Awesome K6
A curated list of resources on automated load- and performance testing using k6 🗻
Stars: ✭ 78 (-71%)
Mutual labels:  load-testing, performance-testing
Element
💦Load test your app using real web browsers
Stars: ✭ 204 (-24.16%)
Mutual labels:  load-testing, performance-testing
Performance-Testing-Tools
🛠 Curated list of Performance Testing Tools ⚡ All contributions are welcome 💜
Stars: ✭ 17 (-93.68%)
Mutual labels:  load-testing, performance-testing
graphql-to-postman
Plugin for converting GraphQL to the Postman Collection (v2) format
Stars: ✭ 27 (-89.96%)
Mutual labels:  postman, postman-collection

️ This project is no longer maintained in this repository.

Development and maintenance have been stopped in this repository.

A fork of this project is active and maintained at apideck-libraries/postman-to-k6.

Postman-to-k6

Converts a Postman collection to a k6 script.

Content

Features

  • Prerequest scripts.
  • Test scripts.
  • Variables (at all scopes + dynamic).
  • Data files.
  • Authentication methods (except Hawk).
  • File uploads.
  • postman.* interface (exceptions below).
  • pm.* interface (exceptions below).
  • Global variables exposed by Postman: globals environment data iteration.
  • xml2Json conversion.
  • All Postman Schema versions.

Installation

Local Installation (recommended)

While possible to install globally, we recommend that you, if possible, add the converter to the node_modules of your test project using:

$ npm install -D postman-to-k6

# or using yarn...

$ yarn add postman-to-k6

Note 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.

Global Installation

$ npm install -g postman-to-k6

Docker

The tool is also available for usage in Docker. To download an image with the tool from DockerHub:

$ docker pull loadimpact/postman-to-k6

Usage

To convert an exported collection to a k6 script:

$ postman-to-k6 collection.json -o k6-script.js

Then run the script in k6, as usual, using:

$ k6 run k6-script.js

Options

Iterations

Configures how many times the script will be executed before completion.

Flag Verbose Default
-i --iterations 1

Example:

$ postman-to-k6 collection.json --iterations 25 -o k6-script.js

Environment Variables

Provide environment variables from a JSON file.

Flag Verbose Default
-e --environment N/A

Example:

$ postman-to-k6 collection.json --environment environment.json -o k6-script.js

Global Variables

Provide global variables from a JSON file.

Flag Verbose Default
-g --global N/A
$ postman-to-k6 collection.json --global globals.json -o k6-script.js

CSV Data File

Provide a data file in the CSV format.

Flag Verbose Default
-c --csv N/A
$ postman-to-k6 collection.json --csv data.csv -o k6-script.js

JSON Data File

Pass in a data file in the JSON format.

Flag Verbose Default
-j --json N/A
$ postman-to-k6 collection.json --json data.json -o k6-script.js

K6 Param Options File

Pass K6 parameter options as a file in JSON format.

Flag Verbose Default
--k6-params N/A
$ postman-to-k6 collection.json --k6-params k6-params.json -o k6-script.js

Separate

Split requests into separate files, for easier rearrangement of the logic.

Flag Verbose Default
-s --separate false
$ postman-to-k6 collection.json --separate -o k6-script.js
postman-to-k6 collection.json -s -o k6-script.js

Skip Pre

Skips any pre-request scripts during conversion

Flag Verbose Default
--skip-pre false
$ postman-to-k6 collection.json --skip-pre -o k6-script.js

Skip Post

Skips any post-request scripts during conversion

Flag Verbose Default
--skip-post false
$ postman-to-k6 collection.json --skip-pre -o k6-script.js

Docker Usage

Using the Docker image, you execute the tool as follows:

$ docker run -it \
    -v "/path/to/postman/collection/:/postman/" \
    loadimpact/postman-to-k6 \
    /postman/my-collection.json \
    -o /postman/test.js

and then execute the k6 test using:

$ k6 run /path/to/postman/collection/test.js

Examples

A collection of Postman examples are located under example. To run one of the examples, just run it as you would any other command:

$ postman-to-k6 example/v2/echo.json -o k6-script.js

Unsupported Features

  • Sending requests from scripts using pm.sendRequest.
  • Controlling request execution order using postman.setNextRequest.
  • Cookie properties, like hostOnly, session, and storeId.
  • Textual response messages:
    • responseCode.name
    • responseCode.detail
    • pm.response.reason
    • pm.response.to.have.status(reason)
    • pm.response.to.not.have.status(reason)
  • Properties returning Postman classes:
    • pm.request.url pm.request.headers
    • pm.response.headers
  • The Hawk authentication method.
  • Deprecated xmlToJson method.
  • Request IDs are changed. Postman doesn't provide them in the export so we have to generate new ones.

Other similar tools

Credits

Thanks to bookmoons for creating this tool. Also, thanks to borjacampina for creating the original incarnation of the tool.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].