Forum Discussion

asnaeb's avatar
New Contributor
3 years ago

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 datasourc...
  • ChrisAdams's avatar
    3 years ago



    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.