Forum Discussion
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
jcabelloa, I'm not sure I understand what you are refering to when you say "DataSource - Number of Rows"? Do you mean the "Rows Per Iteration" option? If so I think you need:
// Example run from Groovy Script test step def dataSourceTestStep = testRunner.getTestCase().getTestStepByName("DataSource") dataSourceTestStep.setRecordsPerIteration(1)