Does Karate evaluate the entire JSON array passed to 'call' before iteration when paginating large datasets?
0 reputation · 03 Nov 2024, 13:44 UTC
To paginate a large dataset in Karate, testers often want to drive the 'call' keyword with a JSON array that contains page‑size and offset values, avoiding the need to maintain a bulky Examples table.
While the documentation warns that large Examples tables can increase memory consumption during execution, it does not specify whether passing a JSON array to 'call' behaves the same way or if the array is evaluated lazily by the embedded JavaScript engine.
Does Karate load the whole JSON array into memory before starting the call loop? If it does, what patterns can be used to stream pages incrementally? Is there a configuration or alternative keyword that enables lazy evaluation for large data-driven calls?