I am new to SuapUI and I am trying to use the Contains assert to verify that a certain string exists in a response. I know I can match the value I am looking for with a JSONPath match ($.data.ratu_desc), but the value might not always be in the same position (0).
I merely want to verify that the string "ratu_desc": "Total Canada" exists in the response.
What regex should I use? Even when I go to the online regex testers to test my regex pattern, when I paste the pattern into the Contains box it matches nothing.
I think the contains assertion only works for xpath (xml), not jsonpath (json).
So the regex does work, but only for xml.
Im not sure but i think i remember trying this before and ending up having to use a script assertion instead.
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