Search This Blog

June 23, 2020

How to test localization using Selenium?

Today someone asked me about how to test localization of the Portal using Selenium. This is the good question.

In our React Portal (Microsoft Dynamics 365 Customer Service Insights) , we need to support 43 languages.  

For example, if we want to test in Spanish, we can just add lang= ‘es-ES’. 

  ChromeOptions options = new ChromeOptions();

  options.AddArgument($"lang={language}");

When you run the test, the Chrome window will be launched in Spanish. Is that simple?

The following 6 languages are not supported in our React Portal because it still shows English.

Malay = "ms-MY";

Basque = "eu-ES";

SerbianCyrillic = "sr-Cyrl-CS";

SerbianLatin = "sr-Latn-CS";

Kazakh = "kk-KZ";

Galician = "gl-ES";


Last year I opened the bug to bugs.Chromium.org. Finally, they closed it and status was “Won’t fix”.

If you see the same issue above, do not feel surprised.


June 19, 2020

CloudTest: No error message appears in the Azure Pipeline if data-driven tests fail.

Our team at Microsoft decided to use CloudTest framework to run Selenium Tests against React Portal in Azure Devops.

I have developed many localization tests. Today I saw many failed, but there was no error message showing up in the release pipeline and it was hard to debug.

I posted the issue in Stackoverflow.microsoft.com where everyone working at Microsoft can post the questions.

The dev in the CloudTest team replied and said the main issue is that these tests are data-driven tests, and they are not handling the results (especially the way they are reported using InnerResults) correctly while parsing trx files. They have created the work item to track this request.

Hopefully this feature can be finished and deployed shortly..