Maintaining interface definitions

As an application under test evolves over time, its windows and dialog boxes also change; therefore the TestArchitect interface entities associated with them must be updated.

Typically, the need for maintenance is discovered when your automation fails to run successfully due to changes in the underlying application.

The Interface Viewer allows you to maintain existing interface entities by reconciling the differences between the contents of the interface entity and the controls that currently exist in the application.

Tip: It may often be the case that you will need to update an interface entity to accommodate changes to an application, while still requiring the use of the original interface entity for testing the old version of the application. Such might be the case if, for example, an application was available in two or more language versions. For scenarios such as this, please refer to Variations to learn how to conveniently maintain multiple definitions of a given interface entity.
To update an interface entity:
  1. Ensure that the correct window of the application is open.
  2. Open the interface entity in TestArchitect, ensuring that its tab is currently the active one.
  3. Launch or refresh the Interface Viewer. The Interface Viewer attempts to synchronize the interface entity and the application window.
The degree of synchronization between the interface entity and the application is determined by examining both the UI explorer and the Interface Elements panels of the Interface Viewer:
  • In the UI explorer panel, those controls of the application for which interface elements exist are denoted with a green check mark , while those having no mapping appear with the red double angle brackets .
  • The Interface Elements panel, by contrast, presents us with the status of each interface element of the open interface entity. Synced elements are accompanied by the green check mark. If any missing elements exist, they are denoted with a red circle with bar icon . (Missing elements are interface elements pointing to controls that do not exist, perhaps as the result of a change in the application under test. For example, given this interface element:



    which maps the ta name login-button to the AUT button with caption = Login, if a new version of the application changes the button's caption to Sign in, this interface element is considered missing, at least until it is updated with a new value for the caption argument.)

Mapping controls to unmatched elements

Interface elements identify controls in an application window. It is possible, often as a result of an application change, for an interface element to lose its mapping to its associated control. We call this an "unmatched" element, and the cause is generally a change in one or more property values of the control. When this occurs, you must remap the control to the unmatched element.

The Interface Viewer offers a convenient way to remap unmatched controls:
  1. Launch the Interface Viewer.
  2. Map an unmatched control by performing the following steps:
    1. In the Interface Elements panel, select an unmatched interface element. Unmatched elements are indicated with a red crossed circle .
    2. In the UI Explorer tree, select that control which is to be remapped to the selected interface element.

    3. From the Viewer's toolbar, click Map to unmatched element .
      Fastpath: Alternatively,
      • right-click the selection, and then either select Map to Unmatched Element, or
      • select Tools > Map Entity/Element in the main menu.
The UI Explorer and Interface Elements panels reflect the new mapping for the control.

Tip: If you prefer to remove an unmatched interface element, rather than remap a control to it, simply edit the interface entity that contains the element and delete it.