Contributions
Re: Specific data from HTTP test response to parameter
Ok I have looked at this some more and I figured out that the problem is the CDATA (not mentioned in my first post). So here we try again... I can get the following into a parameter (with help of steps described here: http://www.soapui.org/Functional-Testin ... cdata.html): (But I cant do a xPath on that data because of the CDATA and that the XXX_HEADER value is a string in CDATA and not a tagged value). <![CDATA[ */(function(window,Kalle,config){config=Kalle.AnkaConfig={SOME_URL:"https://xxx:8008/yyy/zzz/123123",XXX_HEADER:"KalleAnka 1234567890", KALLE_URI_URI:"https://xyz.com/xyz.xd.proxy.html",LOCALE:"sv-se",STATUS:"incomplete",A_URI:"http://aaa.com/b.php",PARAM1:"Hi there ",PARAM2:"https://bbb.com/1.js"};config.container=window.document.getElementById('a-container');window.Hej=Hej;})(this,window.Hej||{});/* ]]> */</script><script type="text/javascript" src="https://hej.com/abc/hej.js" async="async" defer="defer"></script></div> Any idea how I can get the value of XXX_HEADER (KalleAnka 1234567890) into a new parameter ? BR /Wendigo12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes0CommentsRe: Specific data from HTTP test response to parameter
I guess that it is done by parsing the response by looking for the message between XXX_HEADER and KALLE_URI but how is that done ? Have googled it for some hours without finding any answer. Much easier if there is a xml response and not like here JSON over HTTP. Maybe you know an easy way to get my data ? BR /Wendigo12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes0CommentsSpecific data from HTTP test response to parameter
Hi I need help in getting some text into a parameter from the response of a HTTP test request. What I need in my parameter is 'KalleAnka 1234567890' in the response below. The response in RAW format looks (almost) like this (Where ... is more data): ------ HTTP/1.1 200 OK Server: xxx/1.0.0 Date: Mon, 15 Oct 2012 10:15:11 GMT Content-Type: application/xyz+json Content-Length: 2002 Connection: keep-alive Pragma: no-cache Cache-Control: max-age=0, no-cache, no-store {"something1":"hej1","something2":"hej2",.........{SOME_URL:\"https://xxx:8008/yyy/zzz/123123\",XXX_HEADER:\"KalleAnka 1234567890\",KALLE_URI:\"https://xyz.com/xyz.xd.proxy.html\"...............} ------ BR /Wendigo12 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes5Comments- 12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.7KViews0likes0Comments
Re: How to get header data from a RAW response into a parameter
Getting: No signature of method: java.util.ArrayList.length() is applicable for argument types: () values: [] Possible solutions: last(), get(int), get(int), getAt(java.lang.String), getAt(java.util.Collection), each(groovy.lang.Closure)12 years agoPlace ReadyAPI QuestionsReadyAPI Questions8.8KViews0likes0CommentsRe: How to get header data from a RAW response into a parameter
HTTP test steps and I can retrieve the complete response (as described above) with: def str = new String(testRunner.testCase.testSteps["init"].testRequest.response.rawResponseData) return str .. in a DataGen12 years agoPlace ReadyAPI QuestionsReadyAPI Questions8.8KViews0likes0CommentsHow to get header data from a RAW response into a parameter
I need to get a url in the header from a RAW response into a parameter. How can I get the Location url into that parameter named e.g. location ? The complete raw response (including body) looks like this: ---------------------- HTTP/1.1 201 Created Server: some-server-idenifier Location: https://some-server:some-port/some/url/unique-token Date: Mon, 18 Jun 2012 07:11:11 GMT Content-Type: application/some-content-type Content-Length: 2 [] ---------------------- BR /Wendigo12 years agoPlace ReadyAPI QuestionsReadyAPI Questions11KViews0likes10Comments