Forum Discussion

jsc's avatar
jsc
Regular Contributor
9 years ago

Improving namemapping performance without losing stability

Hi all,

 

I have some questions regarding our namemapping of our web application.

 

In our testautomation we regard the namemapping as the heart of all the tests. If the namemapping is broken, not clean or bad otherwise the tests will have problems. So we invested quite a lot of time in building the namemapping. 

  • we only map new elements manually not by recording any test
  • we do no merging of namemapping (just one is updating mapping)
  • almost all (95%) of the mapped items have unique identifiers in idStr or ObjectIdentifiers (the other 5% are either legacy elements, that will be cleaned step by step or elements where such identifiers are hard to implement (according to our dev squad, like dynamic amount of cells in a row)
  • we regularly check the namemapping if there are "bad" elements that do not have an id or readable name
  • we do not store code completion data at all as this would rapidly increase our namemapping up to hundred or more megabyte
  • all unneeded elements (panels, cells, tables,...) are removed from the namemapping (as well in mapped objects as in aliases)
  • all elements have extended find enabled (in mapped objects and in aliases)

 In general this works very well and the time invested in the namemapping has paid off.

 

But the last point comes with a slight drawback, that mapped objects are not always found in time, espacially if they are located deep in the tree. 

  • in TestComplete 10 (with the old search algorithm) this just happens once in a while
  • in TestComplete 11 (with the new search algorithm) this happens all the time (already registered a bug for this)

We implemented a function that refreshes the mapping and is called before problematic elements. This works fine and is needed on just a few items in TestComplete 10. As our software keeps growing there for sure will be more such problematic items and I consider the refreshing just as a workaround that I do not want to call all the time.

 

So I tried different auto-wait timeout values.

- previously we had 4000 ms which led to the very sporadic objects were not found in time

- I increased it to 14000 ms and - as far as I see - all of those sporadic problems disappeared

 

Our software is fast enough, so we need the auto-wait timeout just for TestComplete to map the objects. 

 

14000 ms is really slow, this increases test duration by around 40 minutes for each test part (we have 4 test parts, that are executed in parallel on different virtual machines, each runs for about 2.25 to 2.5 hours) and increases delay when a screenshot fails as well.

 

So if possible I would like to go back to 4000 ms (or even less) auto-wait timeout for a faster test but with the same stability that objects are always found in time.

 

Can anybody recommend some improvements that I could try to apply?

Is anything that we are doing really wrong or bad?

 

Best regards,

Joachim

 

4 Replies

  • krispowell's avatar
    krispowell
    New Contributor

    Unfortunately, I do not have any performance tips to provide. But, I would like to add, however, that we are having a similar issue with namemapping in TC11. The performance declined significantly between TC10 and TC11.

     

    I'd be very curious to hear any suggestions from other users and/or SmartBear.

     

    Cheers,

    • jsc's avatar
      jsc
      Regular Contributor

       Hi Kris,

       

      apart from the issues regarding TestComplete 11 I try to improve my namemapping in general.

      I am not sure that I have done everything the best way possible.

       

      Especially I am not sure if removing all elements that are not needed for the test itself (like some .cell., .panel., .table., ...) from both mappings (mapped objects as well as aliases) and just keeping some elements (the ones that are actually needed in the tests (either clicked or screenshoted). With all these elements having extended find enabled. This way sometimes lots of levels are cut out between two mapped objects which (I assume) causes the not too fast recognition of objects.

       

      Best regards,

       

      Joachim

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Guys,

         

        As far as I know, our R&D team is currently working on improving the NameMapping feature. Thus, I strongly recommend that you contact our Team and report the issues you have with NameMapping. If you provided them with the steps to reproduce issues, we would fix it for sire. You can send your request to TestComplete Support Team ( http://support.smartbear.com/product-list/ ).