I am calling the feature (which has some validations) in the loop N number of times. This code works and calls my feature 3 times.
* def xxx =
"""
function(times){
for(i=0;i<times;i++){
karate.call('classpath:api/test/hello.feature');
}
}
"""
* call xxx 3
In the feature file I am calling, first line of code is:
* def someVariable = 0;
* def index = response[someVariable]
* some other code
I need someVariable to change based on the i index. For example, in the loop, first time feature is called * def someVariable = 0;Second time it is called * def someVariable = 1; Third time it is called * def someVariable = 2;
How can this be achieved? Or can I add this variable inside the JS loop? Or, maybe __loop can be used (looked at the examples, but was not able to implement it). Thanks in advance.