Test Complete getting crashed due to DB Error
Hi All ,
My test complete used to crash rarely but now a days it started frequently , so while I was trying to find the root cause I understood that if there is a db error(like the column name is wrong or query is wrong or index etc) in one execution then the test complete getting crashed.
In next execution, the same db execution gets executed and if I execute immediately again test complete gets crashed , every 2 nd execution test complete will crash.
Sometimes if I restart my machine twice it gets solved .
Is there any other way to stop this , if I use try catch exception[python] does it stops getting crashed.
The Code[Python] which am using is
AConnection = ADO.CreateADOConnection() # Specify the connection string AConnection.ConnectionString = "Provider=MSDASQL;" + "DRIVER=Ingres; " + "Data Source=LMK2 penelope;" + "SERVERTYPE=INGRES;" + "Database=itvtestauto;" # Suppress the login dialog box AConnection.LoginPrompt = False AConnection.Open() # Execute a simple query RecSet = AConnection.Execute_('select short_name,demo_code from demo') RecSet.MoveFirst(); data_container = [] r= [] while not RecSet.EOF: rows = RecSet.Fields.Item["short_name"].Value data_container.append(rows) RecSet.MoveNext() AConnection.Close() Log.Message(str(data_container)) dbcount = len(data_container) Log.Message("The Database Count of the List is :"+str(dbcount))
Sounds like an issue to raise with the support staff directly.
https://support.smartbear.com/message/?prod=TestCompleteSomething else you might want to try is, after you're finished with your ADO objects, try setting the variables to "null" to just clear them out of memory. TestComplete does have some of the garbage collection going on in it but it's not 100% reliable. Null your objects and see if you still get the crash.