Q. A website supports 5 different languages. What would be the testing strategy?
A. We can have 5 property files for 5 languages that have keyword-value pairs. Keywords are same in all property file and may have different values as per language. During execution, testcase can decide which locale property to be loaded and test will run for all languages. In this approach we are aggressively testing all the permutations and combinations. This is not a good approach.
Q. What else can be done then?
A. We can run our test for one language. For rest we can just check if the page is loading for correct language or not. We can rely on actual property files that are used in the code base of our website.
Q. What in case there is an issue in language property file of actual code base of website?
A. We should have tested it at unit level in that case. It is just about validating keyword and value pairs at that point. And comes as five huge websites in later stages.
Q. In which cases this approach can't be used?
A. If we do not have language based property files with us and we are getting that information though API calls from some other source.
Q. What could have been done in that case?
A. We should have implemented api automation in that case.