Forum Discussion

clay's avatar
clay
Contributor
8 years ago
Solved

Why does TestComplete to "hang" during certain actions?

I have noticed that TestComplete appears to "hang" or have long delays during certain actions.  Specifically, I have noticed at these times:   1.  Playback during test execution.  What does it mean...
  • tristaanogre's avatar
    tristaanogre
    8 years ago

    clay wrote:

    With respect to #1 - is it possible that the name mapping criteria is confusing TC, causing it to have to look harder to find an object before it can push something? 

     

    The procedures where I am seeing this behavior do not have any looping going on (yet).  However, the application we are testing creates and destroys GUI objects dynamically during run-time.  Furthermore, the object types and settings are fairly generic, so I have found the name mapping aspect for this test system to be a challenge.


    Well, locating an object that is mapped is, kind of, an internal loop, especially if you are using the Extended Find feature of NameMapping.  Basically, if you have a button that, natively, is something like.

     

    Sys.Browser.Page('http://www.test.com'').Panel(0).Panel(0).Table(0).Cell(1,1).Panel(1).Table(1).Cell(1,3).SubmitButton('Save')

    the Extended find feature with NameMapping could reduce this to

     

    NameMapping.Sys.browser.pageTest.buttonSave

    Basically, all those panels and tables and cells, since they aren't strictly necessary for interacting with the component and are non functional containers are "telescoped" and you will see buttonSave have the "Extended Find" flag checked beside it.  In this situation, TestComplete does a search down the tree from the page to the button to locate and find the button to click on it.  The more intermediate levels that are "collapsed" by the Extended Find, the longer this search can take.  So, if I remap my object as 

     

    NameMapping.Sys.browser.pageTest.Table1.buttonSave

    And have the extended find on both Table1 and buttonSave, this DOES speed up the process because it's a faster search to get to Table1.. and then a faster search from table1 to the button.  The more layers you add in between, the faster it is.  For example, I could turn off the Extended Find search on buttonSave if I map it like so.

     

    NameMapping.Sys.browser.pageTest.Table1.cell13.buttonSave

    Basically, Table1 has the Extended Find option turned on but the subsequent containing cell and button do not because they are direct children.  This is a faster search than the aforementioned one.  This is why Aliases are used instead because I can keep that mapping with the table and the cell but then collapse it back to something manageable by doing

     

    Aliases.pageTest.buttonSave

     

    So... yes... NameMapping identification could be the culprit in #1... but there are ways of correcting that by being more concientious of your mapping... and, if you start to see performance problems, go back and make adjustments.