Forum Discussion

BernardFanthom's avatar
BernardFanthom
Contributor
9 years ago
Solved

Mapping TestComplete scripts against VB6 application. Losing mappings very rapidly.

All,   Since getting a new release of a system written in VB6 I am having to do a heavy overhaul on the scripts regarding remapping objects.   This body of work is heavily compounded by mappings ...
  • BernardFanthom's avatar
    BernardFanthom
    9 years ago

    On a different forum I got the following reply which I will adopt moving forward. I also believe that moving forward future builds of the app written in VB.NET will not have mapping problems as bad.

     

    In TestComplete, you can create aliases. That is the preferred way.

     

    What I like to do is create an alias at 3 levels, 1st at the screen level (what ever window or dialog), then 2nd at the container level (what ever section or parent table is holding the target control), then finally one at the target control.

     

    From there, you can remap those aliases to adjust to most major changes under the AUT.

     

    So after you do your mapping, first map the window, assign it an alias, then map the container relative to the alias assign that an alias, then map the control relative to the container alias and assign that control an alias. Then when you reference controls in your tests, use the control's aliases instead of the direct mapping.

     

    That cooler thing you can do from there, is you can create different mapping profiles in TC, that reassign those aliases. Which will allow you to keep your tests backwards compatible.

     

    I put this question out on a different forum and got the following advice which I am going to stick with moving forward. I also believe that future builds of the app in VB.NET should "quiten" the mapping problems: