Forum Discussion
8 Replies
- Hello,
Can you please provide more context around what you are doing, this should be possible without scripting in SoapUI Pro.
Regards,
Temil - Hi,
you have to manually move the datasource to the next row - try the following:
def ds = testRunner.testCase.testSteps['DataSource']
rowAdd = ds.getPropertyValue("Id")
listId.add(rowAdd)
while( ds.next( testRunner, context ))
list.add( ds.getPropertyValue("Id") )
...
Hope this helps!
/Ole
SmartBear Software - fedemikhailNew ContributorHi,
I use below code to read values from Data Source through groovy script, but only get last value. What is wrong?
def listClicks = []
def ds = testRunner.testCase.testSteps['DataSource']
rowAdd = ds.getPropertyValue("agname")
log.info(rowAdd)
listClicks.add(rowAdd)
while(ds.next( testRunner, context )) {
listClicks.add( ds.getPropertyValue("agname") )
}
Thanks,
Mikhail - Hi,
Custom code solutions is outside the scope of support.
According to the API documentation link below, the next method has a third parameter of List<String> properties. You should check if your getting any errors.
http://www.soapui.org/apidocs/pro/com/e ... ource.html
Regards,
Marcus
SmartBear Support - fedemikhailNew ContributorHi Marcus,
Thanks for your response.
But I could not find enough documentation regarding Next method by this this link.
Could you please give an example how Next method works and what should I use as third parameter.
Thanks,
Mikhail - fedemikhailNew ContributorHi,
I have a number of values (>6500) which getting from SOAP response and need to sum up them.
Before I have used Groovy script to parsing values from XML to List and then summarize, but it is taking very long time.
Data Source allows to handle it and get collection much faster, but I don't know how to sum up values from Data Source.
Is there any other way to summarize values from SOAP response in Soap UI?
Thanks,
Mikhail - Hello,
I think this would be best if we handled this via a ticket. Can you please create a case in the link below and include your project with the dataSource with all the properties and let me know exactly where you are pulling them from.
Create Case here: http://www.soapui.org/Support/support-overview.html
Regards,
Temil - questsbymunFrequent Visitor
Hi Abhinav,
Has your question every been answered? I am running into the same problem. Googled the soupui api library (https://www.soapui.org/apidocs/pro/com/eviware/soapui/impl/wsdl/teststeps/WsdlDataSourceTestStep.html), but it's not very descriptive of what each methods does. Every time I run my groovy script, which use the same code as yours, it only return me the last item on the list even thought the rows count was 8. I have tried all the following methods to try to reset back to the 1st row in the Datasource, but without any luck!
repositionAtStartRow(com.eviware.soapui.model.testsuite.TestCaseRunner testRunner, com.eviware.soapui.model.testsuite.TestCaseRunContext context)
restart(com.eviware.soapui.model.testsuite.TestCaseRunner testRunner, com.eviware.soapui.model.testsuite.TestCaseRunContext context)
setStartRow(String startRow) --> with startRow = "1"
Mun