Contributions
Re: Trying to remove CDATA from response not working
Oh yes sure! So the response was returned in JSON; which contained 3 nodes. The 2nd node contained the XML I needed to extract my necessary data; called "suite_id" I set up a property called "XMLData"; and a property transfer. I used the Property Transfer "wizard" to select the 2nd JSON node, via the XPATH path language. I transferred this to the XMLData Property; so this now contains the XML response. From here I set up a new property, "SuiteID", and another property transfer. Using the new property transfer, I was able to extract the SuiteID data from the XMLData property. Again using the XPath language in the property transfer wizard. I transferred the data to my "SuiteID" property.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.1KViews0likes1CommentRe: Trying to remove CDATA from response not working
Hinmrao thanks again for taking the time to respond. I moved to another solution for my problem using the property transfer steps to extract the data I need from the response XML. Seems to work just fine! Kind Regards, Steven.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes4CommentsRe: Trying to remove CDATA from response not working
Thanks for the replynmrao, when you say it is not appropriate; is that because it won't work? I hope to remove the CDATA tags so that the XML will format properly; can be viewed in the "Outline" tab, and I can manipulate the formatted XML to extract data as needed, as the software was designed to do. If that is not possible I can look at other solutions, but for now, that's what I am aiming to do.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.1KViews0likes6CommentsTrying to remove CDATA from response not working
Hi All, I am hoping someone can help me here! I have have a REST request that is returning a response, which seems to be in JSON format. I don't know much about JSON at all. I can see the XML response also, which contains the "<![CDATA[" tag. I want to remove the CDATA tag, so that I can use the "Outline" tab to extract necessary data from the response. I am using an event handler to replace all; in order to remove the tag but it isn't removing it. The strange part of this is, when I try and remove any other text, that text is removed, which proves the event handler is working. It just won't remove the CDATA tag. Any help would be greatly appreciated! I will attach a snip of the XML tab, and also the code I have in the event handler is below. The event handler is "RequestFilter.afterRequest" def content = context.httpResponse.responseContent content = content.replaceAll( "<!\\[CDATA\\[", "" ) content = content.replaceAll( "]]>", "" ) log.info( content ) context.httpResponse.responseContent = content Thanks in advance. Steven.Solved4.2KViews0likes9CommentsRe: Loop Test to Run same test against 3 different endpoints
If that is the case, then it's a lack of understanding on my side; which is not surprising as I'm only relatively new to this software! I will have a look into this further. Thanks againnmrao5 years agoPlace ReadyAPI QuestionsReadyAPI Questions799Views0likes1CommentRe: Loop Test to Run same test against 3 different endpoints
I have done a good bit of research on this onerichie the datasinks work if you use different excel sheets for each one; but that is no use to me unfortunately:smileysad: they are relatively simple tests. 1. data source - read in a date 2 .soap request xml - (uses date above) 3. response - extract two values from the response 4. data sink - output the response values to two specific columns in an excel sheet I had initially hoped, that I could loop this test, and run it against a few endpoints, so that I would get 2 values output from each test. Then, you had suggested setting up the requests individually (your first message). However, the issue with the datasinks meant it would only output the last value extracted. Do you know is there somewhere I can log that as a bug/defect?5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes0CommentsRe: Loop Test to Run same test against 3 different endpoints
nmraoI had a look at your response a little more in depth, and I agree that there is much less coding involved than I initially thought; if any. There is still seemingly no way to loop the cases on the endpoint this way; as in run the same test case each time against 3 endpoints, then move onto the next testcase? I will look into the command line in the future for running my tests, however, I am setting up these tests for someone who may only be comfortable with "point and click", so I have to keep it as simple as possible. Thanks for your help on the matter, you have helped me in the past as well and I appreciate it!5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes3CommentsRe: Loop Test to Run same test against 3 different endpoints
thanksnmrao, I am setting these tests up for another team; so using the UI was the hope, as they may want to maintain/amend the tests and wouldn't be experienced with code. Kind Regards, Steven.5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes7CommentsRe: Loop Test to Run same test against 3 different endpoints
Thanksrichiefor the reply, this was potentially the best solution, except SoapUI/ReadyAPI really doesn't like more than one datasink in one test case. I set it up as you had described, but only the last datasink outputs data to the excel sheet. (I think that might be a bug with Soap?) I tested it also, I deleted any two of the data sinks and the remaining datasink output data to the sheet. The same happened when any of the data sinks were left. Many Thanks for the response all the same.5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes0CommentsRe: Is it possible to get Data Sink to write output to excel file horizontally and not vertically?
Thanks to everyone who has responded. I don't think it is possible via datasink. (it certainly maybe possible through Groovy, but I am not very proficient with that as of yet.) As a work around, I reshuffled the excel sheet so it will expect the response in vertically.5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews2likes1Comment