Forum Discussion
Hi,
The recommended practice for TestComplete is not to merge any project files. (Script units with script code is an exception but even these files must be merged often. Daily at least.)
If some object does not exist in NameMapping and Aliases it obviously cannot be used in tests because TestComplete runtime has no idea what real object in the tested application should match that Alias.
Thank you
- AlexKaras8 years agoChampion Level 3
Hi,
> Is it a good and safe idea?
Silver bullet does not exist and every solution is usually a result of several trade-offs and is located somewhere in the middle between extreme conditions.
Full name of the object is its full absolute name :) and corresponds to this exact physical control. If/when developers change control type, its location within objects hierarchy or its identification properties you will have to update your test code appropriately.
NameMapping is (among other useful things) a translation table that makes it possible to create a logical name to be used in test code and bind this logical name to the physical one. So, you will need to adjust only NameMapping when something changes for the mapped control. Test code stays unmodified.
Aliasing is the next level of NameMapping abstraction. Aliases refer to NameMapping (and through it to physical controls) and make it possible for you to organize controls tree for your tests in a way that is more logical and convenient for test code from end-user and tester point of view.
Summary:
-- Use of Full Names only will result in a hardly maintainable code;-- By creating wrapping functions that return objects by their Full Name you will (less efficiently) duplicate NameMapping functionality;
-- Usually, the best approach is to create a reasonably small basic NameMapping tree and map skeleton elements of your tested applications UI. Then, using these skeleton elements as search roots, use .FindXXX() methods to search for dynamic elements that are either difficult or not worth to NameMap (e.g. table cells, drop-downs, etc.)
- habhoub8 years agoOccasional Contributor
Thank you, Got it :)
so it's better to keep working on Name Mapping but to be careful how to update it correctly.
Actually, some team members are using the full names of the objects, others still using aliases..
Related Content
- 12 years ago
- 12 years ago
- 12 years ago
Recent Discussions
- 12 hours ago
- 12 hours ago
- 4 days ago