Ask a Question

Conditional JsonPath are not working with SoapUI 5.7

New Contributor

Conditional JsonPath are not working with SoapUI 5.7

After upgrading SoapUI to 5.7, the conditional JSON path used on test assertions is not working. This is working fine with 5.6.1 version


Json path - punches[*].[?(@hasComments==true)].commentsNotes[0]


Sample JSON response - 

"startDate": "2022-01-10T00:00:00",
"endDate": "2022-01-10T00:00:00",
"punches": [{
"id": 15800,
"hasComments": true,
"commentsNotes": [{
"id": 387,
"comment": {
"id": -16,
"name": "Dummy Name",
"categories": [{
"id": 3,
"qualifier": "AAAAAA",
"name": "AAAAAA"
"notes": [{
"text": "Update note",
"timestamp": "2022-01-22T10:52:09",
"dataSourceDisplayName": "AAA",
"dataSourceId": 11
"isPhantom": false

Regular Contributor

Hi @navneet_goyal ,

it seems to me that your JSONPath tries to apply two selections:

  • all punches: [*]
  • only punches with [?(@.hasComments==true)]


This JSONPath gives punches with hasComments==true:



This JSONPath gives you all punches:



I assume the different behavior is caused by the upgrade of Jayway jsonpath library to version 2.4.0. See SoapUI 5.7.0 release notes: .


Best regards,



Hi @KarelHusa 

Do you recommend modifying all existing tests to reflect the new format for JSON path or do you expect this behavior might change in future releases of SopaUI?




@navneet_goyal ,

I cannot predict what happens in future versions of SoapUI, but still do not expect changes in basic JSONPath handling.


There were different opinions in the past how JSONPath should work (some opinions tended to XPath-like behavior) and so it's implementation evolved during the last years. SoapUI 5.7.0 has updated JSONPath Jayway library from 0.9.1 to 2.4.0.


You can also see this thread related to JSONPath changes in SoapUI 5.7.0.


I would recommend to change the JSONPath strings to safer format. And where you are not sure test it (without exposing sensitive data) in or similar tool.


Best regards,



Showing results for 
Search instead for 
Did you mean: