Reseting datasource to first row
Hello,
I have a functional test in which I am using same datasource step in two different loops. First loop is to create a data, second loop to validate. However I am unable to loop the datasource second time - it "loops" only the last row.
I have tried to create a groovy script between these loops to validate whether "ds.getRestartOnRun()" and "ds.setRestartShared()" are true and yes, they both are true for that datasource step.
Why the datasource is not reseting by itself when those two params are set to true? Is there any way to trigger the reset from script or set the current row?
Thanks
Hi,
You're only missing a second Datasource test step.
Insert a new Datasource step either before Step 5 for Step 6. Call the step itself something different, like "Datasource - validate" I suspect before Step 6 is the place.
Then update DataSourceLoop2 to point at the "Datasource - valdidate" datasource step.
Why did it not work? The Datasource step keeps track of the current row whilst the testing is running. When the test runs again, it resets, but it doesn't reset in the context of the same test running. That's why the second loop is on the last row.