Issues with postman-to-k6 iteration while running on cloud


I am using postman-to-k6 to convert my postman tests to k6. I am having issues running the converted script on cloud

Error on cloud: Aborted script error Archive validation failed for test_run_id=749816: The 'iterations' option is currently not supported for cloud runs. (4000)

I have lots of data to be tested and lots of apis. How do I run the postman converted scripts on K6 cloud ?

Command used to convert

postman-to-k6 collection.json --json data.json -e environment.json -o k6_script.js

some sample data is as follows:

     "article_id": 1301212,
     "unique_id": "b3f14503-e1e8-5200-94f4-d7378f6d135f",
     "randomText": "Incredible Rubber Mouse Thu Jun 11 2020 13:24:36"
 }, {
     "article_id": 1301211,
     "unique_id": "cc21cb0d-805e-5b19-bef3-00b5d125c03d",
     "randomText": "Engineer middleware Fri Jun 12 2020 05:52:39"
 }, {
     "article_id": 1301209,
     "unique_id": "a7023caa-9796-57fe-90d2-fec519dc89c1",
     "randomText": "generate Dynamic Fri Jun 12 2020 11:09:30"

This sample data contains 1000 unique_id’s

One of the request which i am sending in postman is as follows

curl --location --request GET 'https://<myurl>/public/comment/latest?articleId={{unique_id}}'

excerpts from converted_k6_script.js

     const file = (() => {
      // Load data file
      const text = open("./data.json");
      const rows = JSON.parse(text);
      return rows;
    options.iterations = file.length;

    const Iteration = Symbol.for("iteration");

    export default function() {


Hi @dipeshlshah,
Not very familiar with postman-to-k6 , but the k6 cloud currently (it will change but there will be * :wink: ) doesn’t support running just iterations in it. The currently supported options are using stages or duration + vus (which is mostly a single stage with the same starting vus as the stage one).

If I understood you correctly you want to do 1 iteration per 1 line of that json and no more? Do you want the iterations to be in parallel or do you want them sequential?

You can read this post by @mark on how to use data only once in a test and still be able to use stages.

Hi @mstoykov,

Thanks for getting back to me. I just want to execute all rows in json (any parallel or sequential iteration would work for me)

Unfortunately, the post doesn’t mention any support for postman-to-k6. please suggest.

@dipeshlshah, postman-to-k6 generates a k6 script it just does use a lot of wrapping to make it look like postman or at least to keep some code snippets from it directly.

But how k6 is told to run is kept exactly the same either way - in this case the postman-to-k6 scripts sets iterations, you will just need to change the script so that it does what is proposed in that post.

Maybe this can be added to postman-to-k6? Also maybe @simme has other ideas :wink: as the maintainer of postman-to-k6 ;P.