-
Notifications
You must be signed in to change notification settings - Fork 71
How does compatibility work?
Mockingjay will check easy things such as status codes, URLs and headers to see if they match. If you define you want a particular header and it isn't in the response, then it will fail. What's more interesting is how response bodies are checked
It uses jsonequaliser to check compatibility, rather than just a straight string match as that tends to create false negatives.
What this does is look for "evidence" that two JSON strings are compatible. If JSON A has a field called "name" which has a string value, then JSON B has to have that field and any string.
It checks types and checks the whole structure it gets (i.e nested). For arrays, if JSON A has an array of 3 "things", then JSON B must have at least one element in an array with the same structure
The same as above.