I was wondering, if there’s some method in katalon that allow us to validate just the api contract (Something like: iterates the response and check if the properties that i set are returned in request response [neither more nor less])
Currently, i’m using the containsString method to do the job, but i’m almost sure that there’s a better way to do this.
Has anyone ever had to do something like this ?
Given the service contract should be well defined, for a given request, the response should be known and predictable. If you want to verify the entire response, then yes, I would certainly iterate the response elements and compare values.
What did you have in mind as an alternative?
BTW, personally, I would try to be more exact than containsString. I’d also likely run the request in JavaScript and examine the response in JavaScript, too (but that’s just me).
I have web app which use multiple microservices , multiple database. Need to validate the API Contract testing which used in different microservices.
i.e. request and response and validate JSON schema.