Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Is there a limit to XPath complexity in SOATest?

Options
goofy78270
goofy78270 Posts: 133

I have the following json response from a call that I am looking to evaluate certain fields on before making the second call, but when I build out the xpath with more than 3 conditional checks, the viewer for that databank bank entry fails to evalute or open again, once closed

{
    "txnId" : "90f2ef78-3223-4069-b26d-bd9c496290a9",
    "timestamp" : "2022-06-20T20:54:48.529Z",
    "message" : "SUCCESS",
    "device" : {
        "macAddress" : "18b430ddd10e",
        "name" : "Nest Camera",
        "hostName" : "Unknown",
        "iconReference" : "CAMERA",
        "groupName" : "NA",
        "deviceState" : "CONNECTED_UNPAUSED",
        "dhcpAddressV4" : [
            "192.168.1.191"
        ],
        "connectionType" : "WIFI",
        "wifiRadioFrequency" : "5.0",
        "radioFrequenciesSupported" : {
           "radio24" : true,
           "radio50" : true
       }
        "firstSeenTimestamp" : "2022-03-08T19:18:57.266Z",
        "lastSeenTimestamp" : "2022-06-20T20:26:58.621Z",
        "advancedId" : {
            "accuracyLevel" : 5,
            "brand" : "Nest",
            "model" : "Nest Camera",
            "name" : "Nest Camera",
            "operatingSystem" : "N/A",
            "type" : "Camera"
        },
        "displayName" : "Nest Camera",
        "icons" : {
            "x1" : "https://dtcb6w6c85867.cloudfront.net/perf/adid/icons/v1/ic_device_digital_camera.png",
            "x2" : "https://dtcb6w6c85867.cloudfront.net/perf/adid/icons/v1/ic_device_digital_camera@2x.png",
            "x3" : "https://dtcb6w6c85867.cloudfront.net/perf/adid/icons/v1/ic_device_digital_camera@3x.png"
        },
        "schedule" : {
            "name" : "Created By GraphQL Service - 2022-06-20 03:31:53",
            "enabled" : false,
            "startTime" : "04:00",
            "endTime" : "05:00",
            "daysOfWeek" : [
                "SAT",
                "SUN",
                "MON"
            ],
            "timezone" : "America/Denver"
        },
        "connectionHealth" : {
            "score" : 5.0,
            "status" : "EXCELLENT"
        }
    }
}

Xpath in Databank that works fine

boolean(/root/device[deviceState/text()="CONNECTED_UNPAUSED"][connectionType/text()="WIFI"][wifiRadioFrequency/text()!="2.4"])

Adding 4th clause for evaluation cause the viewer to not open or evaluate

boolean(/root/device[deviceState/text()="CONNECTED_UNPAUSED"][connectionType/text()="WIFI"][wifiRadioFrequency/text()!="2.4"][radioFrequenciesSupported/radio24=true])

Is this a known issue or new found bug? Is there a work around?

NOTE: version parasoft_soavirt_2021.1.0_macosx_x86_64
Memory heap set to 4GB

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,235 ✭✭✭
    edited June 2022
    Options

    Is this a known issue or new found bug?

    It looks like an issue in the Saxon library which is throwing a runtime exception when trying to parse that particular XPath.

    Is there a work around?

    Please correct the last clause to [radioFrequenciesSupported/radio24/text()="true"]