cancel
Showing results for 
Search instead for 
Did you mean: 

how to get number of rows from DataSource result?

Not applicable

how to get number of rows from DataSource result?

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
1 REPLY 1
Super Contributor

Re: how to get number of rows from DataSource result?

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
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors
Top Kudoed Posts