Localization testing for Android

@Tanushree_Bal,

I’m sorry, but your description has confused me. Let’s define the problem.

What you have:

  • 14 different languages supported by your product
  • Access to the languages files from the developers
  • Test software designed around the page object model

What you want:

  • Localization testing, which is…
    ** Validating the strings on the screen when the device language has been changed, or
    ** Something else?

If it’s the former, there are two ways to solve this problem using a script that walks through all screens

  1. Go to a screen, record everything, change the language settings to each of the 14 languages, and validate each item on the screen.
  2. Go through all screens, recording everything in one language, repeat for each language.

Android does the language translation for you automatically. It might be easier just to validate the language files are all correct. Whether you choose this route or want to take the screenshots, it will be necessary for you to understand the structure of the language files. The all take the form for key -> value, where key the keys are the same in each language file, and the values are localized strings. Instead of creating a separate class file for each language (all of which will be the same and hard-coded, which leads to fragile software), I’d suggest reading the original strings.xml files into a data structure that you can access by language and key, allowing you to compare all values.