To run this tutorial, you will need:
- Node.js - JavaScript runtime environment that executes JavaScript code outside of a web browser.
- Postman - Tool that is used, above all, for the REST API.
- Yarn - Dependency manager.
Code Editor:
Now clone this project to your local machine:
$ git clone https://github.com/elionavarretev/Postman-to-k6Script.git
This project uses a node.js. To run the tests and build an executable jar, open the terminal and run:
$ npm init --y
then, you will need postman-to-k6.
$ yarn add postman-to-k6
We will need to create k6-scritp.js.
$ postman-to-k6 .\\Postman\\Collection\\K6-scritpt.postman_collection.json --environment .\\Postman\\Environment\\K6-scritpEJEMPLO.postman_environment.json -o .\\k6\\k6-script.js
Run the script.
$ postman-to-k6 .k6 run --out json=\\report\\my_test_result.json \\k6\\k6-script.js
Please run and review the code If you think something needs to be improved; you can indicate the file issue or submit PR.