Class instantiation using vbScript
So far, I'm not loving TestComplete 11. I created classes which have worked perfectly in TestComplete 7, and 10. Now that I've upgraded to TestComplete 11, the instantiation of the classes work fine for a while, then they simply stop working and once that happens, they don't work again.
For example:
I have a unit, Testlogging.svb
Inside this unit is the class definition:
Class TestLog
...Private Variables
...Methods
...Properties
End Class
Also in the unit is the helper:
Function New_TestLog()
Set New_TestLog = New TestLog
End Function
In my test scripts I include the unit with 'USEUNIT TestLogging and when I want to create a new instance I make the call as follows:
Dim MyLog: Set MyLog = New_TestLog()
This has worked since it was written in TestComplete 7 and was working fine even in TestComplete 11 until the this morning when I went to run a script and got the error:
Object doesn't support this property or method: 'TestLogging.New_TestLog'
In the unit where the call is made, I can use Ctrl+Click on New_TestLog and it takes me to the procedure so the reference is not the problem. I tried fully qualifying the call with Set MyLog = TestLogging.New_TestLog but that fails as well with the same message. If I put a breakpoint on the call that fails to step into it, then run the test what happens is without stopping at the breakpoint, I get the same error. If I put a breakpoint on the last executable line BEFORE the call, same issue. Note that breakpoints in every other location had been working fine.
While I was writing this, I tried again to run the code without making any changes and now it works. For how long, I have no idea.
Has anyone else had any problems with this?
Thanks
Bill