| || |
Language Independant Scripting for Localised software
Anyone any ideas on how to use Silk to achieve language independence for testing localised gui applications. There is some pointers in the Silk manual but there is quite a lot of donkey work involved here.
Also are there any functions out there to check if a control (eg pushbutton caption) is truncated and to see if a control overlaps another control ?
Re: Language Independant Scripting for Localised software
The amount of work it takes to make scripts language independent depends on the type of testing you are performing and the type of application. If you are verifying a lot of labels or static text on dialogs then quite a bit of the script will need to be localized. An example might be verfiying that the first menu item under the File menu in Windows Notepad is called "New".
If you are running more high level tests (that can assume that the underlying UI is stable), then you might be able to get away with only a little script localization.
Here are some of the things I did to my scripts to make them language independent:
1. Use WindowID tags whenever possible. Some possible problem areas are menus and dialog captions.
2. Create a separate include file that contains only the strings that absolutely must need to be localized (there will some). Then create a new version of the file for each language. I had to do this for all the dialogs in my application. The WindowID was always $0 and the Index was always #1, so a caption tag was necessary.
3. Do not over-verify UI during test cases. SilkTest makes it too easy to "verify everything" for UI elements, which may cause your scripts to be dependent on a language specific UI property that is not in the direct scope of your test case.
One thing I did not try (but it might work for you), was to get all necessary strings from the localized resource files in the application being tested. Then you would just have to switch the resource files to test a different language.