1

If the responseCode is 200 then assert the response and add the data to a variable,

Ex- '''* if (responseStatus == 200) - then do perform the below 3 steps

  • match body.header == "PASS"
  • def header = body.header
  • karate.abort()'''

Can we bring the 3 steps in a flow if the if condition matches?

If responseStatus is not equal to 200 then do below

'''* eval for(var i = 0;i < length; i++) if(override[i].type == "Demo") karate.appendTo (override[i].response = 'Good)'''

Nagaraj
  • 73
  • 4

0 Answers0