I am calling multiple json and js files in my feature file in background, which is required for every scenarion in my feature file.

  • def test= read('classpath:testData/responseFiles/test.json')

problem is that, it is running/reading for each scenario. Is there something i can do, so that it read only once for feature file and can use for all scenarios. I am using 9.0.0 karate version

callonce is only working to call feature filen not json file

1 Answers

Peter Thomas On Best Solutions

Read the JSON file in a called feature and then use callonce.