Forum Discussion

martin_home's avatar
martin_home
Occasional Contributor
6 years ago

Name mapping

Hi, I am looking for guidance on Name Mapping.

 

I am relatively new to TestComplete and wanted to gather ideas about what forum users consider the best approach to creating the Name Mapping.

 

  • Is it  best to allow  Alias and Name mapped objects to be automatically generated ?
  • How do I prevent incredibly long aliases from being generated? 
  • Do I populate the Name mapping area with all the objects in my application before starting to script?

All ideas around this topic will be most gratefully received

  • Auto generated namemapping is a great starting point and to see how your application is laid out, but will never be the final step for reliable tests. You should always go back in and tweak to provide good identification properties, adjust extended find, etc...

     

    Aliases are controlled by you, you can move the around, group and re-arrange however you want regardless of the length / size of the mapped objects. That's why it's there, so you can have shorter paths in your code that are relatively static in the chance you need to tweak the mapped object heirarchy. 

     

    My approach is to do one section at a time. Ex:

    1. Map the login screen, then create scripts for interacting with it. 
    2. Map the next screen, then create scripts for interacting with it. 
    3. Etc...

     

    If you want a good playground to testing approaches with some defined challenges check out:

     

    http://uitestingplayground.com/

  • cunderw's avatar
    cunderw
    Community Hero

    Auto generated namemapping is a great starting point and to see how your application is laid out, but will never be the final step for reliable tests. You should always go back in and tweak to provide good identification properties, adjust extended find, etc...

     

    Aliases are controlled by you, you can move the around, group and re-arrange however you want regardless of the length / size of the mapped objects. That's why it's there, so you can have shorter paths in your code that are relatively static in the chance you need to tweak the mapped object heirarchy. 

     

    My approach is to do one section at a time. Ex:

    1. Map the login screen, then create scripts for interacting with it. 
    2. Map the next screen, then create scripts for interacting with it. 
    3. Etc...

     

    If you want a good playground to testing approaches with some defined challenges check out:

     

    http://uitestingplayground.com/