Test CompleteName mappingTechnology
Chen nengtech
2007-8-14
Configuration Management
If configuration management does not control the code, the following situations may affect automated testing: When programmers modify the program, they find that the name of a control is not nice, I changed the name that I think is better. The result is that the name of this control is used in many parts of the automated test script, which causes most scripts to fail to be executed.
This is a typical problem of inadequate configuration management. At this stage, the program is basically stable, and most of the automated test scripts have been written. The function module should have been controlled for a long time, however, because the configuration management is "stored in real name", it is only a simple source code storage management, without "control", the programmer's changes to the source code are too random and no review is made before the changes, after the change, relevant personnel are not notified in a timely manner, so problems mentioned above will occur.
Configuration Management is a solution to the above problems. At the same time, some technologies can be used in automated testing to help solve similar problems.
Name MappingName ing technology
In Tc (test complete), you can customize names for processes, forms, controls, and other objects, or, in other words, you can map an object to another name.
First, the name ing technology can make your script code more readable. For example, editorwindow is better than sys. process ("Editor "). window ("Editor", "*",-1) should be short and easier to read.
Second, make the script and object names independent from the object attributes, and the object attributes may be different in each build. For example, the control name may be changed, just like the problem mentioned above. The name ing technology can save your script code changes in this case.
Technical Principles of name ing
When an object name is mapped to a personalized name, the attribute and specific value used to identify the object are specified. For example, you can map process ("Notepad") to notepad. Its name attribute is notepad, while username is chennengji. These attributes and their values are stored in corresponding name ing items. TC can use these attributes during record and playback to identify the mapped object.
In TC, map names are accessed through namemapping objects or aliases objects.
When TC encounters a personalized name during script execution, it will access the name Mapping engine to search for the object tree to see if there are objects consistent with the specified property. Once found, the script engine that is returned to TC.
When a TC recording script is executed, TC checks whether the object is mapped by name. If yes, it checks whether a proper name ing item can be found, TC records the ing name or alias (rather than the Common Object Name) in the script.
Name ing and alias (aliases)
Because the operating system contains many objects with the same attribute value, searching the entire object tree is a very time-consuming process. TC will require you to map the parent object of the ing object first, starting from the Sys object, which will make the script run faster.
However, if the parent object is mapped, the access path will be long, for example:
NameMapping.Sys.Explorer1.IEFrame.Shell_DocObject_View1.Internet_Explorer_Server.PageObj
TC solves this problem through alias (aliases. An alias is another name of the ing name. Aliases can be reorganized into another tree to shorten the ing path, for example:Aliases.Explorer1.PageObj