Forum Discussion

zitryss's avatar
zitryss
Occasional Contributor
10 years ago

DataSource Loop

Hello everyone,

 

I was wondering if anyone already tried to solve a case, where you need to check if a row in "DataSource" test step is the last one and if it is to make it all start all over again. I was hoping to solve it with some kind of Groovy script, something like that:

 

def currentRow = testRunner.testCase.testSteps["DataSource"].currentRow
def lastRow = testRunner.testCase.testSteps["DataSource"].lastRow

if (currentRow == lastRow) {
	currentRow = 1
}

 

Obviously it doesn't work... Do you have any ideas?

 

Thank you in advance for any help you can provide!

 

Kind regards,

Eugene

No RepliesBe the first to reply