Contributions
Unable to launch SoapUI 5.4.0
Hi, I'm unable to lauch Soap ui 5.4.0. After installation, the splash screen showed and after that the ui didn't turn up even after a long waiting. I have Soap ui 5.3.0 also running in my system. Does this have any impact in launch 5.4.0? Please help to resolve.1.5KViews0likes3Commentshow to store data source values in array
How to store the data source output in an array without the values being overwritten. My XML datasource results in 5 datas - price_discountCode,price_taxWaived,comm_notifEmail,price_creditdelay,comm_smsNumber I try to store these 5 values in an array using groovy. My Groovy to store the data is as below: def DSrowcount = testRunner.testCase.testSteps["XML_DataSource_AttributeName"].rowCount log.info "Total rows of DS output:: " +DSrowcount def ds = testRunner.testCase.getTestStepByName('XML_DataSource_AttributeName') def attributename, attributeid, attributevalue = "" def WS_AttributeNameList = [] def Namelist=[] def WS_AttributeIdList = [] def WS_AttributeValueList = [] for (row in 1..DSrowcount) { attributename = ds.getPropertyValue('attributeName') WS_AttributeNameList.add(attributename) } log.info "AttributeNames are: " +WS_AttributeNameList Expected array output: [price_discountCode, price_taxWaived, comm_notifEmail, price_creditdelay, comm_smsNumber] Actual array output: [comm_smsNumber, comm_smsNumber, comm_smsNumber, comm_smsNumber, comm_smsNumber] Please help to resolve.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1Comment- 6 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.7KViews0likes0Comments
Re: iterate over a specific node in web service response using groovy
I just realised to use Data sink option. I'm able to get the data source output values. But they are not getting appended to the array. Can someone help to append the data sink values to an array. [so it does not overwrite the existing values] I have created a data sink with Groovy where my groovy script goes like this. def WS_AttributeNameList = [] SinkValue=context.expand('${DataSink_AttributeName#WS_AttributeName}') WS_AttributeNameList.add(SinkValue) log.info (WS_AttributeNameList) Every time, it overwrites the value in the current iteration. It doesn't seem to append the data. Can someone please help to resolve this. Thanks!6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes0CommentsRe: iterate over a specific node in web service response using groovy
I was trying to iterate specific xml node. I could get only the first node value only. Not able to iterate. Please help. This is my script: def WS_attributeNameList=[] def WS_attributeNameList_Converted=[] import com.eviware.soapui.support.XmlHolder def response = context.expand( '${WS_GetAccountDetails#Response#declare namespace ....//ns4:GetAccountDetailsResponseMessage[1]}' ) def xml = new XmlHolder(response) WS_attributeNameList = context.expand( '${WS_GetAccountDetails#Response#declare namespace ....//ns4:GetAccountDetailsResponseMessage/ns4:accounter/ns6:CustomerCustomAccounter/ns3:attributes/ns3:attributeName}' ) WS_attributeNameList_Converted=WS_attributeNameList.toString() log.info (WS_attributeNameList_Converted) I'm not sure how to use groovy for iterating specific node - say attributename and store them in array. If I can do this, I can then sort it and make the required validation. Please help.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes0CommentsRe: iterate over a specific node in web service response using groovy
I have a set of attributes in response which is stored in DB in JSON format. Validating if the details in DB are retrieved in response correctly is my final motive. So, I have split the JSON data and stored it in different arrays - say attributeName, attributeId, attributeValue. Similarly, I wanted to store the xml response attribute details in an array and finally compare both the arrays. I have successfully did the Json data storing in array. Now, I wanted to have the response data also to be stored in array, so that i can conclude by comparing both the arrays. Please suggest. Sample response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns4:GetAccountDetailsResponseMessage> </ns4:account> ..... <ns6:CustomCustomerAccount> <ns3:attributes> <ns3:attributeName>TELE</ns3:attributeName> <ns3:attributeId>TRUE</ns3:attributeId> <ns3:attributeValue/> </ns3:attributes> <ns3:attributes> <ns3:attributeName>SMS</ns3:attributeName> <ns3:attributeId>AVAILABLE</ns3:attributeId> <ns3:attributeValue/> </ns3:attributes> </ns6:CustomCustomerAccount> </ns4:account> </ns4:GetAccountDetailsResponseMessage> </soap:Body> </soap:Envelope>6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes0CommentsRe: iterate over a specific node in web service response using groovy
You are correct. I did a mistake in the configuration. Using one of your earlier comment in a post (https://community.smartbear.com/t5/SoapUI-Pro/DataSource-XML-not-returning-data/td-p/147087/page/3), I corrected it and now the data is getting displayed. Now, I want to pass this data into an array. Can you please help to do that as well.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes4CommentsRe: iterate over a specific node in web service response using groovy
Hi, I tried to use it as XML Datasource. I created the properties and executed it. But the data log doesn't seem to be displaying any data although it says Got 5 rows in 3ms. 1. Is there something that needs to be done, apart from providing the row Xpath, defining property? 2. Can i use the output data values to get stored in an array? Please suggest.6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes6Commentsiterate over a specific node in web service response using groovy
Hi, I want to iterate over a specific node in web service response and store the data in an array. I tried to do some groovy scripting referring the samples in the forum. But the data doesn't get added to the array. I'm trying to loop over the attributeName node in the below sample. Kindly help to resole the issue. My response is like this: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns4:GetAccountDetailsResponseMessage> </ns4:account> ..... <ns6:CustomCustomerAccount> <ns3:attributes> <ns3:attributeName>TELNUM</ns3:attributeName> <ns3:attributeId>4232323</ns3:attributeId> <ns3:attributeValue/> </ns3:attributes> <ns3:attributes> <ns3:attributeName>SMSNUM</ns3:attributeName> <ns3:attributeId>6565464</ns3:attributeId> <ns3:attributeValue/> </ns3:attributes> </ns6:CustomCustomerAccount> </ns4:account> </ns4:GetAccountDetailsResponseMessage> </soap:Body> </soap:Envelope> My Groovy scripting is as below: import groovy.util.XmlSlurper import com.eviware.soapui.support.XmlHolder def WS_Data = context.expand( '${WS_GetAccountDetails#Response#declare namespace ns6.....GetAccountDetailsResponseMessage[1]/ns4:account[1]/ns6:CustomCustomerAccount[1]}' ) log.info("Start") class AttributesInfo { def attributeNameObj } List<AttributesInfo> AttributesInfoList = new ArrayList<>() def WS_Results = new XmlSlurper().parseText(WS_Data) def WS_attributes = WS_Results.Body.GetAccountDetailsResponseMessage.account.CustomCustomerAccount.attributes // iterate over attributes data WS_attributes.each { attributes -> AttributesInfo attributeInfo = new AttributesInfo() attributeInfo.attributeNameObj = attributes.attributeName AttributesInfoList << attributeInfo } log.info (AttributesInfoList) log.info("End") Thanks!!6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.7KViews0likes8Comments