Contributions
Re: Property Transfer - Is it possible to use test case custom property in jsonpath expression textbox?
Hi Rao, I was hoping it could be done with a transfer step... property expansion like this used to work in earlier soapUI versions for XPath... unfortunatelly it is not possible with JSONPath. This would be a feature request for future releases. ;) The Groovy script test step was my plan B. Thank you for saving me some time by providing the code snippet! Regards, Adam2.2KViews0likes0CommentsRe: Property Transfer - Is it possible to use test case custom property in jsonpath expression textbox?
Hi Rao, for instance, I would like to access the lastUpdateDate field like this: $.response.data[?(@.label=='${#TestSuite#Property_Name}')].lastUpdateDate But this does not work, I get the followin error message: Thu Dec 10 14:11:04 CET 2015 lastUpdateDate [Array index [Ljava.lang.String;@1d2eca2 not found in path] Though this works: $.response.data[?(@.label=='Property_Value')].lastUpdateDate EDIT: Result in latter case will be: [2014-08-13T15:48:56] Any idea? Regards, Adam2.2KViews0likes2CommentsRe: Property Transfer - Is it possible to use test case custom property in jsonpath expression textbox?
Hi Rao, the response looks like this (shortened): { "response" : { "endRow" : 300, "totalRows" : 21938, "status" : 0, "startRow" : 0, "data" : [{ "label" : "Property_Value", "lastUpdateDate" : "2014-08-13T15:48:56" }, { "label" : "Property_Value2", "lastUpdateDate" : "2014-08-13T15:48:58" }, { "label" : "Property_Value3", "lastUpdateDate" : "2014-08-13T15:49:01" } ] } } Regards, Adam2.2KViews0likes4CommentsRe: Property Transfer - Is it possible to use test case custom property in jsonpath expression textbox?
Hi, I have got the same issue with property expansion inside JSONPath: I have a custom property "Property_Name" with value "Property_Value" in the TestSuite. Inside a transfer step I want to use it like this: $.response.data[?(@.label=='${#TestSuite#Property_Name}')] It does not work, result is [[]]. But when I specify the value like in the following expression, then I get my desired result: $.response.data[?(@.label=='Property_Value')] Is property expansion inside JSONPath not possible at all or am I doing it wrong? Regards, Adam2.2KViews0likes6Comments