Contributions
Re: What persistent data structure to use for storing object variables between app sessions?
Hi, I was able to solve my problem without the need to serializeand deserialize objects. Also I did not need to use Project Variable of Temporary type either. I used the aqString.Concat() function to append a dummy stringto object.ToString() and was able to save it to my global array variable. I think this somehow forced TestComplete to re allocate the reference to actually a string variable and pass by value. Now when the tested application is restarted, I only needed to account for the dummy string before my comparison and everything worked as expected. Thanks!882Views0likes0CommentsWhat persistent data structure to use for storing object variables between app sessions?
My testing scenario:Need to test cached cached objects between two different application sessions App1 and App2. App1 and App2 are two different versions of the same desktop application that retrieve cached data from the same TEMP directory in Windows. Procedure: Running as one single jscript procedure. 1) Start App1. 2) Capture variable object values in TestComplete and store in array variable after converting to string.( I have tried both global array and Project varible type Table). 3) Close App1 using TestComplete. 4) Start App2 in TestComplete ... and capture same data point and store in similar variable type. 5) Close App2 using TestComplete. 6) Compare the data between the variables for App1 and App2 and report if data is different. Problem: Closing App1 and App2 causes the object data to be lost in both array type as well as project type variables. Therefore at the compare stage, my test fails as all the variables dont hold anything. Is there a clever solution to this problem?? There has to be a way to store object data in TestComplete once the tested application goes out of scope :( so that it can be used by other methods or scripts at the same/later time. I have looked into Persistent variables and I am surprised to see that only limited primitive types are allowed.Am I missing something??940Views0likes2Comments