Is there a limit to XPath complexity in SOATest?
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
-
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"]
0