简体   繁体   中英

Is there any way to save response of each iteration of Scenario Outline to a variable and consolidate all the responses into a single json file

在此处输入图像描述 I'm trying to save the json response of each iteration of the Scenario Outline and consolidate all the responses into a single json file. But i'm unable to save it in the current feature file nor in any other feature file. Is there any solution to this problem. I tried saving the response to a text file using java which is working fine. But i dont want to make use of files which is not advisable. Is there any better way to do this? Any suggestions would help. Thanks in advance.

A Scenario Outline does not give you any control of "before" and "after" the entire set of Examples .

So please consider an alternative approach to "loop" which will give you what you want: https://github.com/karatelabs/karate#data-driven-features

If that doesn't help, please assume that what you want is not supported by Karate. Also read this: https://stackoverflow.com/a/54593057/143475

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM