Jibu
6 years agoOccasional Contributor
UNABLE TO CREATE REGEX EXPRESSION IN ASSERTION FOR REST JSON RESPONSE
I have a json response like below
- {"payload": [{
"maprefnum": "58",
"stgtablename": "table_name",
"tablename": "table_name_2",
"sourcepriority": ""
}]}
So how to give the regex expression for the above response. Whatever I give I get a
Unknown character proeprty/ Some repetition error
Jibu ,
Not sure what regex do you like to apply.
For instance, checking if all property values contains digits only for the given property.
Also, taking array to see with both passing and failing values.
Here is the script (text) with complete comments.
https://github.com/nmrao/soapUIGroovyScripts/tree/master/groovy/ValidateJsonPropertyWithRegex.groovy