Forum Discussion

vikram_u_k's avatar
vikram_u_k
Contributor
8 years ago
Solved

General best practice to map Objects in Hybrid Android Application

Hi Support/ TC users,     I would request your views on the Best practice to use Flat  versus Tree Object mapping.   My observation so far is that there may be about 450 objects and this is favour...
  • AlexKaras's avatar
    8 years ago

    Hi,

     

    As per http://support.smartbear.com/testcomplete/docs/testing-with/object-identification/default-naming/object-tree-models.html, Tree is the preferred and recommended model.

    As for the mapping approach for (hybrid) Android applications, personally I found nothing too different from what is used for desktop and web applications:

    -- If UI of the tested application is frozen and you namemap all objects that are used in tests, then do this. And consider more convenient/simplified Aliases tree to make your test code more readable and short;

    -- If it is not possible to namemap all tested objects, then create a set of core ones that are used as stable 'anchors' where dynamic search of the child objects starts from;

    -- Do not forget about 'Extended Find' namemapping option, but do not use it to search for the objects that are deep down the hierarchy as this decreases the performance;

    -- Also, TC 12 (if I remember version correctly) introduced a new parameter that makes it possible to specify object's search strategy - breadth-first or depth-first. You may play with this to improve the performance.

     

    So... Nothing really special as I said.

    Have you met something unusual that was the reason for your question?