Ok, so maybe I'll rephrase my question, to present a different aspect of what I want to achieve.
Assumptions:
- there's a more than one datapool. They are stored in excel files, but, as they are shared between various tools, they are not "pure data" - there's a lot of metadata, noise, additional information, split across several worksheets in a several workbooks. The data does not start in the first row, nor in the second - it varies from sheet to sheet. The format cannot be altered, because it is used by several different tools at the same time.
- the datapool contains usually several thousand test cases / fixtures, each of which contains at least a few hundred variables. Each fixture is stored in a single row. But the information about which columns contain relevant data (which variables are actually set) is stored somewhere in this row as well (again, it can be resolved on test run-time)
- the user specifies a datapool to use not at design time, but at run-time, via a configuration file (and they want to keep it that way)
- on test does not utilize all the testcases from a single datapool. User specifies (via a conf file again, and to be kept that way) numbers of testcases to be run. So it's something like: use datapool X, and run testcases 100 to 110 and 678 to 2100 out of 4021, but don't run the number 2000.
-workflow to be tested is fairly simple. It's just a series of UI-related actions, like "fill given form and click OK, verify result on the next screen"... but: depending on data configuration in a single fixture (which is resolved at run-time, not at a design time!), some steps are skipped, some steps are done only one time, and some steps are executed several times. The skipped steps should not be displayed in the report. There's only one workflow specified, but it has potentially huge number of variations, so it is not feasible to specify each one by hand in GUI.
And to make things harder, the customer have specifically selected your product

.
I could potentially just throw everything in one huge usercode module, and just run this against all the testcases in datapool, selectively ignoring unrelevant entries, and making enormous log entries, but I have a gutfeeling that it will be neither nice, nor reusable, nor extendable, and I want to provide the customer with a high-end solution that they can expand as they will. I don't care if your internal API is difficult to use, I aim to wrap it in another abstraction layer, to provide a DSL. And yes, I do have programming experience, so it's not that much of a challange. I just need a starting point, and/or code sample.
Again, I want to do two (fairly simple) things:
-feed a custom-designed data source into a testcase. I've already found a way to construct a custom data source, I just have nowhere to shove it into

-construct a testcase on the fly from existing recording and/or code modules. I've figured it partly out (I can run test modules and test cases programmatically), but it's a little bit too little. If I had access to an artificial TestCase object, I could configure at initialization time, I could push relevant code modules (dynamically bound to variables from testcase fixture) to setup, testcase and teardown sequences. Just - how do I do it?