1

Does Karate support the execution of the called feature in parallel w.r.t data, when called using karate.call ? Example below -

def result = call read(sometest.feature) [{"a":10, "b":20, {{"a":11, "b":20}]

Does Karate support the invocation of sometest.feature in parallel for the two datasets in the JSON array?

I tried with a thread count of 2 for the given example and each object in the JSON array is picked up sequentially.

KBM
  • 341
  • 4
  • 16

1 Answers1

1

No, once you are in a call of any kind, it is all on the same thread that was called from.

So the recommendation is to use a Scenario Outline. Karate 1.3.0 makes this easier even for dynamically created data-arrays, please refer the new @setup life-cycle: https://github.com/karatelabs/karate#setup

For more ideas, refer: https://stackoverflow.com/a/60387907/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • 1
    This is wonderful. Thanks for pointing out version 1.3.0. I was trying with 1.2.0 and kept getting "setup" is undefined. Should have read the release notes. – KBM Nov 19 '22 at 01:21