Update Name Mapping During Test Run

Applies to TestComplete 15.70, last modified on December 17, 2024

As your application under test evolves, its objects may change. For example, the object ID or caption may change. If your project uses the changed properties for object identification, TestComplete will not be able to identify the objects, and your test will fail.

You can update your Name Mapping to match changes in your tested application while your tests are running:

Note: This is not applicable for web objects mapped by using XPath expressions and CSS selectors.

1. Enable the update mode

By default, updating Name Mapping during the test run is disabled to prevent the test flow from being interrupted. To enable the update mode:

  1. Select Tools > Options from the TestComplete main menu.

  2. Open the Engines > Name Mapping category.

  3. Select the Update Name Mapping during test run check box.

  4. Click OK to close the dialog and save the changes.

2. Set the timeout for waiting for missing objects

During the test run, TestComplete waits for objects during the Auto-wait timeout period. By default, it is 10 seconds. Before updating the Name Mapping, you may want to decrease this timeout to speed up detection of missing objects:

  1. Select Tools > Current project properties from the TestComplete main menu.

  2. Select the Playback category on the left.

  3. Set the Auto-wait timeout property to the needed value (in milliseconds).

  4. Save the changes to your project.

Make sure that the specified timeout is enough for objects in your application to become available.

Once you have finished updating the Name Mapping, you can change the Auto-wait timeout back to its previous value.

3. Run your test and update the Name Mapping

Run your tests. Whenever TestComplete cannot find a mapped object that a test operation uses, it will pause the test run and suggest fixing the identification problem:

  • If the tested application, browser, or web page is not currently opened, TestComplete offers to open it.

  • If there is an object with similar identification properties, you can command TestComplete to re-map the problematic object to point to a similar object.

  • You can select the target object from screen or from a list of objects of the same type. (See the description of the Update Name Mapping wizard.)

  • You can manually update identification properties to reflect changes in the object. (See Update Name Mapping Wizard - Update Mapping Settings Page.)

After resolving the object identification issue, TestComplete will re-run the current test operation and continue running the test. After the test run is over, remember to save your test project afterwards, otherwise changes made to the Name Mapping repository will be lost.

Notes

  • The Update Name Mapping wizard cannot update objects that use conditional mapping. You will need to update mapping criteria for such objects manually.

  • In certain cases, an object cannot be found because one of its required child objects is not found. When updating an object’s mapping settings, TestComplete resets its Required Children setting to default, that is, no required child objects. You may need to manually correct the Required Children setting for mapped objects afterwards.

  • If the Engines > Name Mapping > Update Name Mapping during test run option is disabled, TestComplete logs an error message when it cannot find a mapped object during the test run.

See Also

Update Name Mapping
Name Mapping
Name Mapping Options Dialog
Update Name Mapping Wizard

Highlight search results