# postman-to-loadimpact

> Convert a Postman collection to Load Impact Lua user scenario

Latest version **0.0.4** (published 2017-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install postman-to-loadimpact
pnpm add postman-to-loadimpact
yarn add postman-to-loadimpact
bun add postman-to-loadimpact
```

Provides the command `postman-to-loadimpact`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-05-17 |
| First published | 2016-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Load Impact |
| Maintainers | ppcano |
| Keywords | loadimpact, loadtest, postman |

## Links

- npm: https://www.npmjs.com/package/postman-to-loadimpact
- Repository: https://github.com/loadimpact/postman-to-loadimpact
- Homepage: https://github.com/loadimpact/postman-to-loadimpact#readme
- Issues: https://github.com/loadimpact/postman-to-loadimpact/issues
- npm.io page: https://npm.io/package/postman-to-loadimpact

## Dependencies (4)

- [commander](https://npm.io/package/commander.md) 2.9.0
- [postman-collection](https://npm.io/package/postman-collection.md) 0.0.13
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) 1.0.2
- [postman-collection-transformer](https://npm.io/package/postman-collection-transformer.md) ^1.7.3

## Recent versions

- 0.0.4 (latest) — 2017-05-17
- 0.0.3 — 2016-06-09
- 0.0.2 — 2016-05-13
- 0.0.1 — 2016-05-12

## README

#postman-to-loadimpact

Converts Postman collections to Load Impact user scenarios. Given a Postman collection, the transformer will auto-generate a [Lua script](http://support.loadimpact.com/knowledgebase/topics/117699-user-scenario-scripting) to be imported as user scenario for your load tests.

The transformer converts Postman requests and [variables](http://blog.getpostman.com/2014/02/20/using-variables-inside-postman-and-collection-runner/)  into Lua requests and variables respectively.

Postman [pre-requests](https://www.getpostman.com/docs/pre_request_scripts) and [tests](https://www.getpostman.com/docs/writing_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](https://loadimpact.com/load-script-api).

The Postman Collection Format v1 and v2 are supported.

## Installation and usage

As npm global package:
 - npm install -g postman-to-loadimpact
 - postman-to-loadimpact path/file.json

As local repository:
 - git clone git@github.com:loadimpact/postman-to-loadimpact.git
 - cd postman-to-loadimpact
 - npm install
 - bin/postman-to-loadimpact.js examples/postman/v1/echo.json

## Options

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 `2.0.0` or `1.0.0`. Default `2.0.0`.
        -o --output <path>            Target file path where the converted collection will be written. Default `console`

## Examples

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 1.0.0


Please, use the [issue tracker](https://github.com/loadimpact/postman-to-loadimpact/issues) to open a discussion or bug report.


Happy load testing!

---
_Source: https://npm.io/package/postman-to-loadimpact · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
