Forum Discussion
Property expansion is supported for end row. You should be able to create a property to store the end row number and a groovy script to update the end row as needed.
Hi jsheph01
Thanks for answering.
Could you give some example of how to use that property expansion and how groovy could help on updating the end row? just a very simple example should be very helpfull. Or, maybe you know a place in the internet where I could have a look?
Thanks and regards,
Joaquin.
... and an example of setting the end row via Groovy:
// Example run from Groovy Script test step def dataSourceTestStep = testRunner.getTestCase().getTestStepByName("DataSource") dataSourceTestStep.setEndRow("5")
Note: The data source test step is the class WsdlDataSourceTestStep.
Radford Thanks a lot for your answer!
And, do you know how to set "DataSource - Number of Rows" property from groovy?
Thant would also be great to have.
Regards,
Joaquin.
looking at the methods on the 'WsdlDataSourceTestStep' page Radford mentioned, there are a lot less set methods than get methods.
There doesn't appear to be anything equivalent to "set number of rows" - but there is a setStartRow() method - could you not use this in conjunction with the setEndRow() to set the "number of rows"? I could be totally wrong - I'm new to all this "look at the API docs to work out the method you need thingy"
ta,
rich
You can find the property expansion documentation page here:
https://support.smartbear.com/readyapi/docs/testing/properties/expansion.html