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 favourable to both Tree as well as Flat mapping. However the flat naming will lead to increased access times rather than the tree format.
Any/All suggestions are welcome..
I have noted that in the example there are a lot of unnamed Layout's which could change in both tree/flat naming structure.
The screen layout and wireframes are already frozen but the type of controls are subject to change.
* using TC 12.10.602 on 4.4.3/Lollipop for API19.
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?