Multiple runs with different sets of data
A) What I have:
I wrote a QTP 11 script that has about 30 actions.
It reads in a line of from a spread sheet and uses 5 values.
It uses these values throughout the scirpt.
B) The request
Now I have a request to add more rows of data to the input sheet and to run the script for each row of data.
The approach needs to be intuitive. It needs to be readily understood and maintained by a replacement person in the future.
C) My plan
I am thinking of adding an action that reads each row of data from the spread sheet. Then this action calls each of the individual actions using the current pieces of data
Any better way to do this?
I may be getting your question wrong but why don't you simply use QTP's global data sheet? Is you data externally stored and maintained by someone who does not have QTP? In that case you can just add the following code to the first action of your test to import the external sheet in QTP's global sheet:
DataTable.ImportSheet "C:\Path\To\File\SpreadSheet.xls", "MyData", dtGlobalSheet