Any simple way to check whether all tags are present or not in json response
I am just looking out a solution for validating all tags are present or not inside my JSON response based on my model schema.No need to consider about values for attributes .Since values will get change based on input data.
To be more clear, If i have total of 2500 lines of json response including arrays , nested arrays.I need to validate all tags are present or not based on my Model schema given in swagger.
Re: Any simple way to check whether all tags are present or not in json response
hi, your final paragraph states that you dont want to validate against the schema. is that realt correct? why would you not want to do that?
cos thats kindof perfect for what you want rather than having to create thousands of assertions.
if you were to use a groovy script to validate against a schema that would do the job.
theres a groovyscript for xml schema validation (support.smartbear.com/readyapi/docs/testing/scripts/samples/xsd-validation.html). you could alter this for json schema validation im guessing.
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta