Forum Discussion

MA0815's avatar
16 years ago

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

  • omatzura's avatar
    omatzura
    Super Contributor
    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