I am working on a framework model for test Automation. Our requirement is that a test script should be generic enough so that it can work with multiple versions of the same product. We dont want our test scripts to have statements like:
if product version is x then do this
else if product version is y then do that
One approach is having functions and function libraries for each product version. But there may be some small QTP statements which dont get wrapped in functions and are really in the test script level.