Eviware Forum

soapUI => soapUI => Topic started by: MA0815 on May 30, 2008, 09:30:27 am



Title: how to get number of rows from DataSource result?
Post by: MA0815 on May 30, 2008, 09:30:27 am
For testing it would be useful to get the number of rows from a JDBC Data Source SQL Query statement result. In GUI it is shown in the message e.g. "Got 3 rows in 2ms". This value should be reused in an XPath Assertion later. How I can access the desired attribute?

br,
maria aschauer
 


Title: Re: how to get number of rows from DataSource result?
Post by: omatzura on May 30, 2008, 09:49:48 am
Hi,

hmm.. you could get the current row number with

log.info( testRunner.testCase.testSteps["DataSource"].currentRow )

after running through all rows, this should return the actual number of rows processed, which isn't entirely correct.. we'll add a rowCount attribute as well..

regards!

/Ole
eviware.com