Ask a Question

How do you stop TC from terminating process?

teddy77777
Contributor

How do you stop TC from terminating process?

Test Complete keeps terminating the application we are testing, saying it is not responding.  I have put in code to have TC wait until it is responding, but it still kills it. So how do I turn off this function in TC. Also why would I want to TC to kill my process yet continue running the script, which it does? Why not just stop the test?
4 REPLIES 4
teddy77777
Contributor

RE: How do you stop TC from terminating process?

Ok, so I found that there is a timeout setting in the Freeze Diagnostics part of the Project Properties. Although it was already set at 30000 I added a bunch of zeros to that to get around this issue.  My program however was only not responing for about 2-3 seconds and TC was still closing it.



Also I was hoping to figure out why the code below was not working?




function ProcessTest()

{

var p, ProName;

ProName = GetProgramName(); 



p = Sys["Process"](ProName);

while(!IsProcessResponding(p))

{

Log["Warning"]("Process Not Responding For Some Reason!");

Delay(500);

}

}

catch(e)

{

Log["Error"](e["description"]);

}

}



function IsProcessResponding(p)

{

var process;

try

{

process = dotNET["System_Diagnostics"]["Process"]["GetProcessById"]((p["ProcessID"]))

return process.Responding;

}

catch(e)

{

Log["Error"](e["description"]);

}

}


YMinaev
Staff

RE: How do you stop TC from terminating process?

Hi Ted,



Are you sure that you looked at the Project settings, not the Default Project settings? It will not work for the current project if you change the default settings.



Try increasing the Application hanging timeout setting in Freeze Diagnostics options (see the Project Properties - Freeze Diagnostics Options and Diagnosing Application Freezes help topics).



 If this does not help, zip the entire project suite directory and send it to us. Also, can you sent us the problematic application or a sample application demonstrating the issue?
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
gentlesea
Frequent Contributor

RE: How do you stop TC from terminating process?

I have the same problem getting random "The window does not respond" messages while trying to write text into a textfield.

I read the proposed workaround here http://www.sqaforums.com/showflat.php?Cat=0&Number=478373&an=0&page=0&gonew=1 but it does not help in my case.



function isProcessResponding(p)

{

  var process = dotNET.System_Diagnostics.Process.GetProcessById(p.ProcessID);

  return process.Responding;

}



Aliases.MainWnd.MenuBar.CircularArcEditor.EdtTable.Edit.WaitProperty("Enabled", true, 60000);

if (isProcessResponding(Sys.Process("iplanRT")))

  Aliases.MainWnd.MenuBar.CircularArcEditor.EdtTable.Edit.SetText("90");

Aliases.MainWnd.MenuBar.CircularArcEditor.EdtTable.Edit.WaitProperty("wText", "90", 60000);



When I have a look at TestComplete running this script I noticed that isProcessResponding is passed immediately.

SetText however takes ages since our application is not responding for quite a time (only seconds though).

Freeze Diagnostics - Application hanging timeout is set to 300000. This should be enough...



What can I do?
Using TestComplete 9.0.2460.7

RE: How do you stop TC from terminating process?

Hi Ernst,



Try increasing the value of the 'Method invoke timeout' option by the factor of 10. To reach the option, double click your project in Project Explorer, select the Properties tab and navigate to the Open Applications | General options list.

 

If this does not help, please zip the entire project suite folder and send us the archive.

Best regards,
Alexey

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: