Automate Localization Testing

Reading Time: 10  min

How to automate Localization Testing?

Description: Automated testing of web/windows application where application supports localized content.
Silk Test International automation tools supports localization testing i.e. testing the application with localization content. Also testing the localization content with no change in the automation scripts. Localization testing is absolutely essential if the application supports or localized to many countries and languages.

What is Localization testing and how can we automate it?
The following solution will show how to write the initial scripts and making use of the same test scripts to test the localization content of the application without doing any changes to the existing automation framework and scripts.

Solution:
Simply using the window id while declaring the objects from the windows application would work best. But not for all the objects from the application under test, window id is not available and end up writing the different test scripts for different localized content.

Other way of handling it out is, declare the object with the next available and reliable property which is Caption. Generating a unique key for each of the objects available in the application and used in the automation framework. And using the key to identify the objects from the application under test. And the unique keys are used to refer to the original properties of the objects from the application under test.

How it works?
Storing the objects property from the application under test in different excel sheets and differentiate the excel sheet name with the country name or the language name. Saving the object property corresponding to the unique keys would help to retrieve the particular object from the particular excel sheet based on the localized language the test script needs. So reading the particular object property from the excel sheet based on the requirement of the test case with the help of unique key would solve the purpose of the localization automation testing without writing the new test scripts.

Merits of this implementation:
1. Any automation tool which supports Internationalization/localization can make use of this approach.
2. Existing and available test script can be used for testing different localization content of the application under test.
3. Requires no change to the existing test scripts for testing the localized content of the application under test.
4. Efficient as declaring the objects with caption which is the reliable property from the application under test.
5. Duplication effort of scripting different test cases can be avoided.
6. Maintenance of the scripts with ease and delivering fix at one place for any change in the behavior of the application under test.
7. Adding a new localized value to the existing framework is easy and no change is required to the framework and can be done from adding a new excel sheet for a new country or language.

Demerits of writing new test scripts for different localized languages:
1. Writing different test scripts for different localized content is duplicating the automation effort.
2. Maintenance of the scripts is tedious, and every single fix needs to be delivered to different test scripts to make them work for a one small change in the behavior of the application under test.
3. Fix has to be delivered to the test scripts for change in the property name of localized objects.
4. Adding a new country or language needs new scripting of test case.

How can we implement this in Borland’s Silk Test Automation Tool?
Silk Test and Silk Test International Tools are products of Borland Corporation for Functional and Regression Automation Testing. Starting from Silk Test 2005 R1, localization testing is supported till the latest version of Silk Test 2009 R2.

We can make use of the above discussed method to implement the localization automation testing. Capturing or recording the objects from the application under test using the ‘Caption’ property. And generate a unique key for the object by the combination of numbers and characters. Open an Excel Sheet, store the captured caption of the object corresponding to the unique key created and save the excel sheet with the localized language or country name.

Open the application under test with different localized language in a browser and copy the caption of the same object for which the unique key is generated above and store the caption to a new excel sheet corresponding to the same key. And save the excel sheet with the new localized language or the country name.

Based on the country or the language requirement of the test case, reading the excel sheet for that country or language and fetch the object with the localized unique key.

Example of Gmail Login Page:

Object Type Localized Key English Caption German Caption French Caption
Text Box Text_UN_LoginPage UN_English UN_German UN_French
Text Box Text_PW_LoginPage PW_English PW_German PW_French
Submit Button SBT_LoginPage SBT_English SBT_German SBT_French
Label Login Successful SFul_English SFul_German SFul_French

Automating the test case for the above mentioned three different countries and languages, the caption for the objects on the pages are different but the localization key generated is same and can be able to pick up the relevant caption from the different excel sheet from the system.

EX: How to use it in Silk Test International,
Browser(“PageName).ObjectName(“Lacalized Key”).Event()

If the localized key is parameterized as a part of the test script development, then have a function that connects to the excel sheet and fetch the corresponding object property for the language and do the event such as click, select, set text or retrieve text based on the type of the object.

Stay Updated
Please enable JavaScript in your browser to complete this form.
LinkedIn
Share
Copy link
URL has been copied successfully!

Other stories you may enjoy...

Healthcare Apps and the Need for Security

One of the most exciting areas in tech right now promises to be “the most personal” ever. A key aspect of making wearable devices like the Apple Watch personal is through...

Developing an App for the 2020 General Election?

Here is a thought: With the UK General Election having just finished, could the next one in 2020 be the first to use a mobile app to allow people to vote? The polling...

Be honest. Describe the state of your test cases.

“There’s some dead wood in there.” “Hmmm…. Someone really needs to clean them up.” “A little outdated.” For those reading this in the northern hemisphere,...