Localization Testing for Web Application Using Automation

Let’s first understand localization testing, and why it is necessary? In this era, software products are being sold in almost every country on this planet. And it may happen that in some countries, they prefer the software product in their own language.

To support this need, products are required to be translated in different languages.

Now, product is translated to a specific language with the help of “Resource Bundle” which is nothing but set of properties files having same key across all languages and values change according to specific language. Testing of the product for functionality and translation would be a difficult task if done manually, as it is not necessary that the translated product is being tested by a person who knows that particular language. Even if the person knows the language, it is a boring task to verify each and every string on the product.

This is where localization testing using automation comes handy. You just need to have the “resource bundle” which is being used by developers for localization of a web application.

So, let’s see how automation can be useful in this kind of testing. What are the changes needed to make automation framework compatible for localization testing?

Following are the points which can be followed.

1. Make provision to accept locale as an input from user, so that automation script will read data from the specified locale

2. Arrange “resource bundle ” in below structure

3. Write code to load properties file. Specify the strings (Keys from properties file) in test script which needs to verified. Write a generic xpath with will accept text from above properties file and search that text on web. If found, then the string is verified.

Ex of xpath : //*[text()=”Value of Key”]

Conclusion: Efforts for localization strings verification can be greatly reduced if the process can be automated, and it’s an easier approach to find bugs.

Leave a Reply