I am using the karate api framework to automate web services. Currently, I am facing problem to set the response value back to the .js or JSON file which I receive from the cucumber feature file.
My response:{"authorizationtoken" : "58102a8c9e074d578edae8f3d5e96001'}
How can I save this to .js or JSON file to reuse them in other scripts [feature files] ?
Thanks in advance.
You cannot save the value to a
.js
orJSON
file provided you don't want to write the value to a json fileYou can assign the value to a variable , let say using a namespacing technique to avoid collision
Then you can call this name space & assign value to it