Jaroslaw
12 years agoContributor
[Res] What does DataSource "Restart On Run" actually mean?
It's either that I don't understand what the DataSource "Restart On Run" option supposed to do or there is a bug.
Test Case Scenario
Delete all records from an external data store by looping delete calls in batches of 10 until there are no rows left.
Test Steps
Request1 - Query 10 rows
DataSource1 - XML, grabs id values from above query response
PropertyTransfer1 - Transfer id value to DataSink1
DataSink1 - Creates an XML string of ids to delete, puts result into "ids" property
DataLoop1 - Target Step = PropertyTransfer1, DataSource = DataSource1
Request2 - Delete ids
ConditionalGoTo1 - If Request1 returned rows, go to Request1
Behaviour when DataSource1 "Restart On Run" = true
On first loop things work as expected. DataSink1 aggregates the 10 ids (id1...10) into an xml string which is used in Request2 to delete those records.
On the second loop, Request1 returns id11...20, and DataSource1 appends those ids to the previous list of ids (id1...10) causing DataSink1 to returns xml for id1...20.
I'd expect DataSource1 to "restart" (reset?) and only contain rows for id11...20.
Behaviour when DataSource1 "Restart On Run" = false
On first loop things work as expected (same as above).
On the second loop, Request1 returns id11...20 but DataSource1 throws error that there is no data (bug?).
Cheers
Test Case Scenario
Delete all records from an external data store by looping delete calls in batches of 10 until there are no rows left.
Test Steps
Request1 - Query 10 rows
DataSource1 - XML, grabs id values from above query response
PropertyTransfer1 - Transfer id value to DataSink1
DataSink1 - Creates an XML string of ids to delete, puts result into "ids" property
DataLoop1 - Target Step = PropertyTransfer1, DataSource = DataSource1
Request2 - Delete ids
ConditionalGoTo1 - If Request1 returned rows, go to Request1
Behaviour when DataSource1 "Restart On Run" = true
On first loop things work as expected. DataSink1 aggregates the 10 ids (id1...10) into an xml string which is used in Request2 to delete those records.
On the second loop, Request1 returns id11...20, and DataSource1 appends those ids to the previous list of ids (id1...10) causing DataSink1 to returns xml for id1...20.
I'd expect DataSource1 to "restart" (reset?) and only contain rows for id11...20.
Behaviour when DataSource1 "Restart On Run" = false
On first loop things work as expected (same as above).
On the second loop, Request1 returns id11...20 but DataSource1 throws error that there is no data (bug?).
Cheers