Search This Blog

Converting Postman Collection to the K6 Script

K6 is a fast performance tool now in the current software industry to test the performance test on a system. K6 is developed uder the Go lanuaage it's supported to script in Javascript.

Here I'm trying to create postman collection and convert collection to a k6 script only using execution 2, 3 command whole to generate a performance script too. It's too eady and too fast to execute. K6 finally gives distriptive summerization of the performance test as well. Following my handls on practical.

1. Create postman collection with all API or API operations and tryout with execution 'Run as Collection' option by postman itself.


2. Export postman collection and the environment variables as a json

3. Install postman to k6 nodejs model with using following command

npm install -g @apideck/postman-to-k6

4. Generate k6 script via using following command

postman-to-k6 [postmand-collection].json -e [postman-environment].json -o [script-name].js

5. Generated k6 script as follows

6. Run the k6 script with using 'k6 run [script_name]'

References - https://k6.io/blog/load-testing-with-postman-collections/

No comments:

Post a Comment

Unlock Web Testing Excellence: Comprehensive Cypress Cheat Sheet !

  Unlock the Full Potential of Cypress with Our Comprehensive Cheat Sheet! Welcome to my blog!   If you're a QA engineer or a test autom...

Most popular