pkroon
15 years agoOccasional Contributor
Data-Driven Loop from DBTable Reload Values
My basic issue is that I have 2 work tables (MS SQL Server) I want to use to drive a sales order entry application. The first will have customer records, and the second will be updated on the fly with item information for each customer. I have a script step that prepares the first table, and then a data-driven loop over this table for all of the customers. This portion works fine. Then, for each customer, I have another script step to prepare the second table, and then have a nested data-driven loop over this second table.
I originally made this all in a single keyword test, and it starts ok, but the inner loop never reloads its values after the first run. Even though the table is updated with the script step, the DBTable variable is not reloaded. To attempt to work around this, I created a separate keyword test that would run my main test. This "wrapper" test has the outer loop, and this loop has 2 steps; the first is to update the table for the inner loop, and then second is to run my main keyword test. My hope was that this inner loop would refresh at each separate running of the keyword test, but it still seems to only use the first set of records it gets, even though I can see the table being updated.
Is there any easier way to accomplish what I am trying to do? Thanks.
I originally made this all in a single keyword test, and it starts ok, but the inner loop never reloads its values after the first run. Even though the table is updated with the script step, the DBTable variable is not reloaded. To attempt to work around this, I created a separate keyword test that would run my main test. This "wrapper" test has the outer loop, and this loop has 2 steps; the first is to update the table for the inner loop, and then second is to run my main keyword test. My hope was that this inner loop would refresh at each separate running of the keyword test, but it still seems to only use the first set of records it gets, even though I can see the table being updated.
Is there any easier way to accomplish what I am trying to do? Thanks.