<BUG> 2.3.0 - JSONPath expression content for array with 1 item returns nothing
My use case:
I have a list of statuses with a list of possible next statuses for each status.
I have an automated groovy script that will go see what a possible next status might be and will randomly select one of those possible next statuses as an input to a "change the status" REST request. This way I have a fully automated status flow test case.
The problem I encounter in 2.3.0 is trivial, but blocks my entire status flow test.
I want to get the list of possible next status, like this:
$.['member'].[3].['nextStatuses']
--> This will result fine in an array with the @id's and prefLabels of statuses 4 & 5. This is similar to a content "JSONPath expression" assertion in a Rest response (so easily reproducible).
--> BUT: If I do the same for $.['member'].[2].['nextStatuses'] I do NOT get any results, even though I would expect the @id and prefLabel of status 3 !
It surprises me to see that a simple assertion/json path expression like this got broken in a SOAPui pro update from 2.20 to 2.30.
{
  "member": [
    {
      "@id": "0",
      "prefLabel": "Status0",
      "nextStatuses": []
    },
    {
      "@id": "1",
      "prefLabel": "Status1",
      "nextStatuses": []
    },
    {
      "@id": "2",
      "prefLabel": "Status2",
      "nextStatuses": [
        {
          "@id": "3",
          "prefLabel": "Status3"
        }
      ]
    },
    {
      "@id": "8",
      "prefLabel": "Status8",
      "nextStatuses": [
        {
          "@id": "4",
          "prefLabel": "Status4"
        },
        {
          "@id": "5",
          "prefLabel": "Status5"
        }
      ]
    }
  ]
}
ReadyApi support team fixed this issue and the new maintenance build contains the solution.
Development has opened defect RIA-7117 and put the fix in a maintenance build for this issue. Please download the maintenance build from the link below.
https://support.smartbear.com/downloads/readyapi/maintenanceNow we wait for the release of ReadyApi 2.4 to include this fix.
Thanks support team!
Best regards,
Joost