Contributions
Version 5.4.0 handles "Follow Redirects" different from version 5.3.0 from SoapUI
When I run a specific test case, it succeeds with SoapUI 5.3.0 but fails with SoapUI 5.4.0. With the newer version, the Login POST request, receives an ERROR 500 from the server. The request must follow some redirects which is done well by version 5.3.0. The POST request is a REST Test Stepthat implements a WADL method. The SoapUI log displays another POST request after the response: HTTP/1.1 302 Moved Temporarily, but that POST should be a GET, which is done well by version 5.3.0. Mon Mar 05 16:34:32 CET 2018:DEBUG:Stale connection check Mon Mar 05 16:34:32 CET 2018:DEBUG:Attempt 1 to execute request Mon Mar 05 16:34:32 CET 2018:DEBUG:Sending request: POST /IFM/j_spring_security_check HTTP/1.1 Mon Mar 05 16:34:32 CET 2018:DEBUG:Receiving response: HTTP/1.1 302 Moved Temporarily Mon Mar 05 16:34:32 CET 2018:DEBUG:Connection can be kept alive indefinitely Mon Mar 05 16:34:32 CET 2018:DEBUG:Stale connection check Mon Mar 05 16:34:32 CET 2018:DEBUG:Attempt 1 to execute request Mon Mar 05 16:34:32 CET 2018:DEBUG:Sending request: POST /IFM/engine/run.html?application=xml.r8-JJI_Portal&version=R5_0&channel=null&language=Nederlands&flow=startinteractief&style=IFM HTTP/1.1 Mon Mar 05 16:34:32 CET 2018:DEBUG:Receiving response: HTTP/1.1 500 Internal Server Error Mon Mar 05 16:34:32 CET 2018:DEBUG:Connection can be kept alive indefinitely Mon Mar 05 16:34:32 CET 2018:INFO:Got response for [http://t-ifm-app-01.org.jstd.local.j_spring_security_check:Login - POST Login] in 7ms (1208 bytes) Mon Mar 05 16:34:32 CET 2018:DEBUG:Stale connection check Regards, Frido879Views0likes0CommentsRe: How to create a JSONPath Property Transfer including a ${Properties#property} ?
Finally I created a groovy script using JsonSlurper. This one has way better performance. The Property Transfer (with XPath) lasts> 6000 msec, when the same trick is done by JsonSlurper, it takes just 20 msec! import groovy.json.JsonSlurper def response = testRunner.testCase.testSteps["handleEvent Melding-Type"].getAssertableContent(); def json = new JsonSlurper().parseText(response).events.changes.changes.model[0].findAll { it != null } testRunner.testCase.setPropertyValue( "model_Melding.Organisatie_value", json.find{it.name=='Melding.Organisatie'}.domain.find{it.displayValue==context.expand('${TestData#Gegevens_melder.Organisatie}')}.value )9.2KViews1like0CommentsRe: How to create a JSONPath Property Transfer including a ${Properties#property} ?
Thank you Paul. My question is indeed comparable withProperty Expansions in JSONPath expression in Property Transfer step So there is no (open source) solution but a workarround which good enough. Thanks for your advise to make use ofnamespace wildcards. This works fine! //*:displayValue[text()='${TestData#Gegevens_melder.Organisatie}']/../*:value Regards, Frido9.2KViews1like0CommentsHow to create a JSONPath Property Transfer including a ${Properties#property} ?
In my project I want to use the test step Property Transfer to pass along some values from a REST response with JSON data within it. The JSONPath I want makes use of a property from a PropertiesStep called TestData. The (part of the) data looks like this: { "model": { "key": "P394-C0-C0-C0-C0-C0-C0-F0", "functionalKey": "P394_Melding-Organisatie_1", "name": "Melding.Organisatie", "properties": { }, "questionText": "Organisatie", "explainText": null, "dataType": "entity", "rejectedValue": null, "readonly": true, "required": true, "hasDomain": true, "multiValued": false, "refresh": false, "displayLength": -1, "domain": [{ "displayValue": "Amsterdam", "value": "Organisatie|0f7d20b8-ea98-412e-b375-b51b5d2aa131|" }, { "displayValue": "Stockholm", "value": "Organisatie|fdea2088-60f9-4064-81b2-f491bc0d5b58|" }, { "displayValue": "Luxembourg", "value": "Organisatie|fdbf6753-f727-47c5-b5e2-9ed32c99bd2c|" }, { "displayValue": "Paris", "value": "Organisatie|b26c12a1-794a-472c-adec-d8240cd14770|" }], "messages": [], "values": ["Organisatie|b26c12a1-794a-472c-adec-d8240cd14770|"], "validations": [{ "blocking": true, "type": "Required", "message": null, "parameters": { } }], "type": "field", "styles": [] } } The JSONPath string looks like this: $..model.domain[?(@.displayValue=='${TestData#Gegevens_melder.Organisatie}')].value[0] When I use this JSONPath within a property transfer, the value of${TestData#Gegevens_melder.Organisatie} cannot be found properly. I have verified the JSONPath by adding a JSONPath Match assertion to the specific RestRequest step. Within this assertion theJSONPathworks fine so I may conclude the path is correct. How can I create such a Property Transfer? I don't want to use the ResponseAsXml possibility because of the enormous namespace I have to declare... but using that posibility works fine when I use the XPath //m:displayValue[text()='${TestData#Gegevens_melder.Organisatie}']/../m:valueSolved9.3KViews0likes3Comments