#postman-to-loadimpact
Converts Postman collections to Load Impact user scenarios. Given a Postman collection, the transformer will auto-generate a Lua script to be imported as user scenario for your load tests.
The transformer converts Postman requests and variables into Lua requests and variables respectively.
Postman pre-requests and tests are appended as comments before and after its respective Lua request. The pre-request and test behaviour could easily be replicated with the Load Impact scripting API.
The Postman Collection Format v1 and v2 are supported.
As npm global package:
- npm install -g postman-to-loadimpact
- postman-to-loadimpact path/file.json
As local repository:
- git clone [email protected]:loadimpact/postman-to-loadimpact.git
- cd postman-to-loadimpact
- npm install
- bin/postman-to-loadimpact.js examples/postman/v1/echo.json
The transformer provides a command line interface with different options.
Usage: postman-to-loadimpact <filePath> [options]
Convert a Postman collection to Load Impact Lua user scenario
Options:
-h, --help output usage information
-V, --version output the version number
-j --input-version <version> Input version. Options `1.0.0` or `2.0.0`. Default `1.0.0`.
-o --output <path> Target file path where the converted collection will be written. Default `console`
A collection of Postman examples are located under ./examples/postman
.
The user scenario will be auto-generated when running:
$ postman-to-loadimpact examples/postman/v1/echo.json
$ postman-to-loadimpact examples/postman/v2/echo.json -j 2.0.0
Please, use the issue tracker to open a discussion or bug report.
Happy load testing!