Anyone know how to persist objects in memory over multiple iterations? QTP seems to completely flush the memory of all objects and variables every iteration, anyone know how to selectively retain those values over more than one iteration or row?
Thanks everyone for all the good replies. The idea is to set a lot of variables in a common template outside of the test and utilize it in many different test. But once we bring that information in via Class we lose all of the values on the following iteration. Just trying to avoid having to set the values more than once.
I have the same problem. I created VB Classes in an external library in the hopes that the classes and their properties(which change dynamically from time to time)would maintain state between iterations in QTP. However, for each iteration QTP dumps everything in memory. I have been forced to use environment variables to hold the important non dynamic values of the class object in memory because I have to re-instantiate the class object for each iteration. Anyone have a better solution than environment variables?
If you had enough time to do it twice, you probably had enough time to do it right the first time.