cancel
Showing results for 
Search instead for 
Did you mean: 

TestComplete hang issue

Haiyangwhu
Contributor

TestComplete hang issue

Hi There,



I've met below issue several times, hoping to get some suggestions.



I have a test item which timeout value is set as 60 minutes. And i have a method to check whether a control exists or not.




function Exists(controlItem)


{


    Log.PushLogFolder(Log.CreateFolder(GetFunctionName(arguments.callee)));


    try


    {


        Log.Message(GetFunctionMsg(arguments));


        // Check if the name mapping item refers to an existing object


        if (controlItem.WaitProperty("Exists", true, 100))


        {


            return true;


        } 


        else 


        {


            // Refresh the mapping information to see if the object has been recreated


            RefreshObjects();


            return controlItem.WaitProperty("Exists", true, 100);


        }


    }


    finally


    {


        Log.PopLogFolder();


    }


}



Direct checking of control's existence by calling controlItem.Exists doesn't work well all the time, so i create the function instead.



But according to the logs of this test item, it sometimes hangs at the if statement

if (controlItem.WaitProperty("Exists", true, 100))

for almost 60 minutes, and the test item fails as timeout!



What are the probable causes and any suggestions to resolve the issue?

Thanks in advance!



OS: Win7

TestComplete: 9.3

3 REPLIES 3
TanyaYatskovska
Community Manager

RE: TestComplete hang issue


Hi Ocean,


 


Try using the WaitAliasChild method to obtain the mapped object: TestObj.WaitAliasChild("controlItem", 5000);

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

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

RE: TestComplete hang issue

Can you increase the wait time to 60000?
Haiyangwhu
Contributor

RE: TestComplete hang issue

Actually, i was using WaitAliasChild at the begining, but WaitAliasChild sometimes doesn't work as i expected:



1. The control indeed exists according to log capture, but WaitAliasChild of it returns false, means the control does NOT exist, that's why i create a function of my own to have a step to refresh the cached namemapping info and check the control again.



2. It also has the hang issue which test won't keep moving after the seconds set in WaitAliasChild.



By the way, today i met the hang issue again when ran below script:

    Aliases.WaitAliasChild("BISuiteServerInstaller", 120000);

it stuck at this place and test case timeout after 60 minutes.





New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors