Forum Discussion
SmartBear_Suppo
Alumni
14 years agoHi,
The DataSink is getting out of sync with the DataSource since it is not being invoked once per iteration, while the DataSource is always being invoked. To keep it in sync it needs to be called as often as the DataSource is called. This means that you will need to call it even when there is no data to write. Unfortunately there is no way to do this without writing data, so you'll have to overwrite the existing value for each line. To get the desired result you could read the "old" value in the DataSource (I take it you're using the same xls file in both Source and Sink?) TestStep, then modify the Groovy Script so that it either writes 44, or writes the "old" value read in the DataSource step. Would that work?
Regards,
Dain
SmartBear Software
The DataSink is getting out of sync with the DataSource since it is not being invoked once per iteration, while the DataSource is always being invoked. To keep it in sync it needs to be called as often as the DataSource is called. This means that you will need to call it even when there is no data to write. Unfortunately there is no way to do this without writing data, so you'll have to overwrite the existing value for each line. To get the desired result you could read the "old" value in the DataSource (I take it you're using the same xls file in both Source and Sink?) TestStep, then modify the Groovy Script so that it either writes 44, or writes the "old" value read in the DataSource step. Would that work?
Regards,
Dain
SmartBear Software