cancel
Showing results for 
Search instead for 
Did you mean: 

Auto update scripts when Name Mapping items/aliases are renamed

Auto update scripts when Name Mapping items/aliases are renamed

Hi,

 

When a Name Mapping item name is changed, it would be great to have all related NameMapping, Aliases updated accordingly through out the code.

 

For example:

A Name Mapping Aliases.MainWindows.NavigationWindow.OkButton is renamed to Aliases.MainWindows.NavigationPanel.OkButton would update all references of the old Aliases path to the new one.

 

Thanks

Simoin Glet

25 Comments
dbattaglia
Contributor

Smiley Sad

 

thanks for the update @Dmitry_Nikolaev

 

please let us know if you pick this up again

Vallalarasu_P
Frequent Contributor

The so called drawback, can be overcome when we create a framework by maintaining the Object isolated from the script (Like POM (Page Object model)  or to maintain objects in External sources (Excel,CSV) or in Variables) 

 

In TestComplete 12.6, We have a feature for NameMapping (Easy update of recognition attributes).  can update all the mapped object in  your namemapping in single click without changing the name but updates the Object attributes. 

 

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/how-...

 

Regards

Valla

https://vallatestcomplete.wordpress.com/

 

 

dbattaglia
Contributor

@Vallalarasu_P your suggestion to use an external library to store the object map is a definite possibility but that would be avoiding the feature under discussion here--you would not be using the NameMap feature at all in this case. again, it is doable but there are reasons why we would not want to go this route.

 

as far as the NameMap update feature recently released, this is super cool but it does not address the functionality asked for in this post: when a NameMap item is updated, run a process to update all references to that item in the test code-base.

 

let me know if i am misunderstanding you.

 

thanks,

daniel

Vallalarasu_P
Frequent Contributor

@dbattaglia - Thanks for the response. I understand that my explaination should have been better. 

 

My suggestion was to Store all the objects in a external file (Excel or CSV or DB) and reference it in the script. So if any updates, then it is easier to update on external file. 

 

The objects, The object properties and Object identification must be stored irrespective of either it is Descriptive, NameMapping or Xpath or any other method. This is help to maintain the script which can be updated easily.

 

The requested feature is, Whenever there is an update or change in the Namemapping, the respective code in the script file must change. 

Option 1: If any Object property is changed eg: idStr - txtUserName to UserNametextbox, then the object properties can be updated in the namemapping, Which doesn't require to change in the script but it is udpated.Reference Object in External fileReference Object in External file

 

Option 2: If the NameMapping Object (UserName) "NameMapping.Browser.Page.Username" is changed to "NameMapping.Browser.Page.UsernameTextbox" in the namemapping file, So the scripts should get changed.

 

If this option is implemented, Feel this can be drawback in code maintaince. For eg: UserName - NameMapping is getting changed and it is been referenced at multiple places. So the Changes will impact in all the places. So to track is changes or identify the places of changes will be a difficult. 

I understand, The NameMapping is not required to change when you can update the property without changing the NameMapping reference.

 

To support option 1: 

 

Eg: Store the object in an excel. The reference to be used, So even if the Object identification is updated will impact on Excel file (To be updated). But not to change the reference in the script. Reference Object in External file

 

 

I respect your thoughts and 64 Likes of expecting this feature. I'm sharing my thoughts of using the current feature.

 

Let me know, if i misunderstood the suggestion. 

 

Regards

Valla

https://vallatestcomplete.wordpress.com/

 

nineteeneigthy1
New Contributor

This would be especially helpful for references to aliases used in Call Object Method operations. TC can update other types of operations, why not everywhere? Seems like something that could be accomplished pretty simply in other IDE's such as VS.

Announcements
Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Join us and watch the welcome video:
Announcements