Tuesday, December 28, 2010

Automation of Globalized applications

What is a Globalized application?
Globalized applications are those in which all of the strings, such as messages, labels and text, are localized i.e. translated to the language of the location from which it was started or launched. 
For example, if an application is started from a Japanese locale or operating system, then all of the information will appear in Japanese
How to automate?
Let’s evaluate  commonly used approaches:

1. Recorder / Playback
 
Record / Playback utility is not useful in localization testing for the following reasons:
v   Most common property used is ‘text’. Obviously, this will not be useful  for localization testing purposes.
v   Few automation programs will record by default mouse clicks on the screen by position. The position of the items in localized software is different from the US software, because most language strings will be shorter or longer than English strings.
 
2. Ordinal Position
The first approach would be the ordinal position of the objects. Ideally, the items are placed in the same ordinal sort in every language.
Example: The main menu of any Microsoft application. File – Edit – View.       

3. ID Numbers 
Is this a definitive solution? Certainly not.  All the objects need not have a unique id. Some objects are just containers for other objects. ID can be just a number or a whole string containing a lot of information from the main window to the deepest object information.

4. Keyboard Events 
This is more or less the same as for the ordinal positions. Within the program, clicking Tab, Arrow keys and Enter can lead to the same screens in any environment, when the objects are placed in the same positions. If the trees, list boxes, combo boxes, check boxes or radio buttons are not alphabetically sorted, we can use keyboard events.

All the traditional automation methods are of no use, then what is the solution?

Finally, a more professional approach to the whole picture: creating resource files 

 Automation Framework:

v  Create and record the scripts against the original software
v  Make the scripts “international” by changing all the software strings and other literals to
     constants. Store in a resource file (Config or VBS file)
v  Associate the resource files to the script