What is the recommended way to restart a test after a failure when reading data from a .csv file

When a failure occurs in the test is loses all of the variables read in from the .csv file. The test is designed to loop through multiple scenarios so I don’t want to start from the beginning to do the previously passes scenarios but I cannot restart from the point of failure because the data read in for that scenario is not longer available to the test. Suggestions?

A few suggestions from me:

  1. After reading the data from CSV, store it in global variables. These keep their value even after the macro is stopped, until the UI Vision app is closed. This seems like the easiest solution.

  2. Or: Move the CSV reading to its own subroutine (“sub-macro”), and then call it from every macro with RUN (sub-macro).

  3. Or: Use the command line o read the data from the CSV. Then use the cmd_var1=hello%21world switch to send the data to the extension.

I went with option 1 and it seems to be working as I hoped. Thanks.

Reopening this issue and looking for some help. So I have updated all of the variables to be read in from the .csv and stored as Global variables and now when it errors I can restart and the values are persisted. However, the macro is really a collection of about 8-10 other smaller macros that each perform a set of actions on a specific page and when all combined complete a transaction for each row of data in the .csv. And when I restart the test using right click, “run from here” it continues playing the one macro that it is in but does not advance to the next macro to complete the transaction. Any ideas on how to overcome this?