Thoughts on the best way to verify a field in a WebService response is NOT empty? If so, I want to stop test execution and log a warning (which is my other question - I don’t see an option for KeywordUtil.markwarning and stop. In this particular case, a warning seems to be more appropriate since the issue is on a 3rd party and not us.
Sorry, I had very little worth sharing, mucked with a few things but couldn’t get it working…
WS.verifyElementPropertyValue(response, "banners", "") == true {
KeywordUtil.markWarning("No ads returned for retailer")
}
But obviously that’s not right since it does the verify and bombs with “Expected element property value ‘’ is not equal with actual property value” . Will play around a bit with what you suggest. Thanks!
looks for my eyes you are trying to handle validations from request object himself.
altough may be a good reason for that (kind of how postman do it), with katalon a better approach will be to handle validations on the test case script and use the request just for it’s purpose. send / receive
in the context of testcase some mark.failed make sense. in request object scope, not.
you can watch the test case in katalon as something above the request, which you can further manipulate.
don’t set the logic for validation on the request object himself unless for quick development /trial and error, otherwise you are just cluttering them witn not needed actions.
with your current approach, to enforce the testcase fail, you have to use plain assert in the request verification snippet.