JoostDG
6 years agoFrequent Contributor
(bug?) - json path match assertion with wildcards 'select from current' results in failure
Hi, When I "select from current" in a JSON path match assertion the assertion actually fails. The field in JSON looks like this: "field" : "targetOffice" The select from current sets the asser...
- 6 years ago
No, that wasn't the difference.
But that showed me in the right direction, so thank you AlexKaras .
It is actually the "allow wildcards" check that explains the behaviour. Nothing to do with the v2.8 vs 3.0, sorry for bringing that up. I never thought allowing wild cards would make the assertion fail. No valid reason for that in my view, so I guess it stays a bug :-)
<con:assertion type="JsonPath Match" name="Match content of [field] smartbear bug - https://community.smartbear.com/t5/SoapUI-Pro/V3-0-bug-json-path-match-assertion-select-from-current-results/m-p/193622#M44379" id="652853cc-94e3-4003-ac79-85af27bf5d60" disabled="true"> <con:configuration> <path>$['errors'][0]['field']</path> <content>"targetOffice"</content> <allowWildcards>true</allowWildcards> <ignoreNamspaceDifferences>false</ignoreNamspaceDifferences> <ignoreComments>false</ignoreComments> </con:configuration> </con:assertion> <con:assertion type="JsonPath Match" id="11a67e54-d8a4-4fe8-924a-67690f6364af" name="Match content of [field]"> <con:configuration> <path>$['errors'][0]['field']</path> <content>"targetOffice"</content> <allowWildcards>false</allowWildcards> <ignoreNamspaceDifferences>false</ignoreNamspaceDifferences> <ignoreComments>false</ignoreComments> </con:configuration> </con:assertion>