A topological best match naming convention apparatus and method for
graphical user interface (GUI) testing are provided. With the apparatus
and method, properties of the GUI object are recorded and stored in a GUI
object database. During execution of test scripts, if a lookup of an GUI
object's name to its runtime control fails, the present invention
attempts to perform a match with the currently known objects. The
matching mechanism is based on a comparison of the properties of the GUI
object to properties of known GUI objects. With this mechanism, a
predetermined set of properties is collected from the GUI object that is
subject to the test script and for which the lookup of the runtime
control failed. Each property of the known GUI objects in the GUI object
database is assigned a weight based on the probability that a GUI object
having a matching property is the same GUI object. Each property is
checked for a match and if a match is identified, the corresponding
weight is added to a total count kept for each correspondence. A
correspondence between a GUI object and a known GUI object having a
highest total weight is selected as a best candidate for use in
determining the runtime control for the GUI object.