The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Software Testing >> Automated Testing

Pages: 1
Tarun_K
Advanced Member


Reged: 01/21/07
Posts: 646
Loc: Bangalore, India
How do you verify text presence in multi locale?
      #688339 - 10/12/11 10:44 PM

While automating multi locale application I had to stop using -

Code:

assertTrue(selenium.isTextPresent("success text message"));



where success text message would change for each locale.

to -

Code:

assertTrue(selenium.isElementPresent("constant_id"))



where id would be constant for each locale. Though tests works now, I would be losing on checking the text it self for different locales. What approach do you suggest here?

--------------------
~ Tarun
Free Selenium Training


Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: How do you verify text presence in multi locale? [Re: Tarun_K]
      #688345 - 10/13/11 12:00 AM

Just don't bother checking the contents of static text using automation. It's a losing proposition for automation and will be 1 extra thing you need to maintain. Just test the text is still present, assuming it's some sort of dynamic text that appears like an error message, or a field with variable values.

Here's the problem with checking static text content with automation. Text is usually define as a constant in some template file or code somewhere. In localization it'll usually be a string table. If you want to automate it, you'll either need to have a copy of all the strings in a data source or hard coded in a test (god forbids hard coded tests). If you have your tests pull from the same string tables as the app does, then your test becomes tainted as it'll be sharing production assets. Localizing tests generally have high maintenance costs in my opinion. Ideally you want your test to be about 1/3rd of the cost to maintain as the actual code for the product. In the localization arena, you are looking at a 1/1 if not more.

Some things you can try, but it's sort of low returns compared to the maintenance are:
* Feed the text to a translation API such as google translate and see if the text coming back is say 50% similar.
* As you navigate pages, take snapshots so they can be emailed off to a 3rd party native language reviewer. (this probably would be the best if translation quality is super accurate)
* Do some cribbing. You know certain key phrases that'll translate consistently, do a search on the page for those key phrases and make sure those are translated to make sure it's not severely broken (like if you know your product name in a different language, you can verify it's not returning the english version and pulling the right language).
* The most common localization problem is usually clipping, you can check this using OCR. Does the scanned control have the same text as it's properties?

--------------------
David Lai
Sr. QA / Test Lead
LinkedIn profile


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun_K
Advanced Member


Reged: 01/21/07
Posts: 646
Loc: Bangalore, India
Re: How do you verify text presence in multi locale? [Re: dlai]
      #688353 - 10/13/11 02:38 AM

thanks for detailed description. I am going to stick with identifying that text locator is available and with "text" while not asserting the content of text.

--------------------
~ Tarun
Free Selenium Training


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe StrazzereModerator
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: How do you verify text presence in multi locale? [Re: Tarun_K]
      #688365 - 10/13/11 03:52 AM

Quote:

thanks for detailed description. I am going to stick with identifying that text locator is available and with "text" while not asserting the content of text.



I don't think I understand the dilemma.

Is there a case where the text locator would work correctly, yet asserting the content of text would fail? Does the text locator not locate an object using the same text that you would assert?

Your approach of replacing hard-coded text strings with variables is exactly what I did the last time I was involved with a large internationalization/localization project. The initializing of the variables was performed within an include file that was locale-sensitive. And the strings in that include file were translated as part of each localization effort. This worked out well for me.

During the Internationalization part of the project, I "psuedo-translated" each string myself, but during the Localization part, a translator did the work.

see:
http://strazzere.blogspot.com/2010/04/pseudo-translation-of-strings-as-aid-to.html

--------------------
- Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!

I speak only for me. I do not speak for my employer, nor for anyone else.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun_K
Advanced Member


Reged: 01/21/07
Posts: 646
Loc: Bangalore, India
Re: How do you verify text presence in multi locale? [Re: Joe Strazzere]
      #688381 - 10/13/11 05:48 AM

Quote:


I don't think I understand the dilemma.

Is there a case where the text locator would work correctly, yet asserting the content of text would fail? Does the text locator not locate an object using the same text that you would assert?




No Joe, text locator would not use text but it would either use html id/name or xpath/css locator to identify that that text message holder is available. Text holder could be "li" etc.

On the hand I am curious to know if the approach you followed resulted in finding localization issues?
Did you come across many localization defects. Thanks for your response.

--------------------
~ Tarun
Free Selenium Training


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe StrazzereModerator
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: How do you verify text presence in multi locale? [Re: Tarun_K]
      #688392 - 10/13/11 06:24 AM

Quote:

On the hand I am curious to know if the approach you followed resulted in finding localization issues?
Did you come across many localization defects. Thanks for your response.



Some, not a lot.

We found a lot of issues during the Internationalization phase. Not so many during Localization.

--------------------
- Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!

I speak only for me. I do not speak for my employer, nor for anyone else.


Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: How do you verify text presence in multi locale? [Re: Joe Strazzere]
      #688601 - 10/14/11 08:52 AM

Pseudo localization is a good way to manually verify strings. But for much less effort on the dev side, they can just scan the source code for statically defined strings.

--------------------
David Lai
Sr. QA / Test Lead
LinkedIn profile


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe StrazzereModerator
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: How do you verify text presence in multi locale? [Re: dlai]
      #688611 - 10/14/11 09:53 AM

Quote:

Pseudo localization is a good way to manually verify strings. But for much less effort on the dev side, they can just scan the source code for statically defined strings.



I wouldn't use pseudo localization for manually verifying strings. (What strings would you be verifying anyway?)

Instead, I use pseudo localization during the globalization process to ensure that all strings have been extracted to resource files, and that the UI works as expected even in the presence of localized (and potentially long) strings.

--------------------
- Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!

I speak only for me. I do not speak for my employer, nor for anyone else.


Post Extras: Print Post   Remind Me!   Notify Moderator  
dlai
Junior Member


Reged: 05/02/06
Posts: 1041
Loc: CA, USA
Re: How do you verify text presence in multi locale? [Re: Joe Strazzere]
      #688626 - 10/14/11 11:25 AM

In terms of system level automation, checking the globalized strings can be done easier using a simple search on the source code, verifying no hard coded strings in the source code with exception to logging messages. And if they really want an automated test, a unit test for this is much more effective, easier to maintain, and faster. At the unit level, you can mock the other systems out and check what you need. At the system level, you start having to coordinate the state of all the other systems. The DB has to be pseudo localized, the other services have to be pseudolocalized, you'll have to create fully functioning mocks of 3rd party services that you can't get pseudolocalized. It becomes a big headache. That's why I say the effort doesn't really justify it.

--------------------
David Lai
Sr. QA / Test Lead
LinkedIn profile


Post Extras: Print Post   Remind Me!   Notify Moderator  
Joe StrazzereModerator
Moderator


Reged: 05/15/00
Posts: 12344
Loc: Massachusetts, USA
Re: How do you verify text presence in multi locale? [Re: dlai]
      #688632 - 10/14/11 12:14 PM

Quote:

In terms of system level automation, checking the globalized strings can be done easier using a simple search on the source code, verifying no hard coded strings in the source code with exception to logging messages.



If the only task were ensuring that there are no remaining hard-coded strings, I would agree with you.

For the systems I last tested the globalization, there was much more testing required. And at least in my case, we felt that the extra effort was justified.

--------------------
- Joe
Visit AllThingsQuality.com to learn more about quality, testing, and QA!

I speak only for me. I do not speak for my employer, nor for anyone else.


Post Extras: Print Post   Remind Me!   Notify Moderator  
TestingMentor
Member


Reged: 12/28/06
Posts: 235
Loc: Seattle, Washington
Re: How do you verify text presence in multi locale? [Re: dlai]
      #688640 - 10/14/11 04:08 PM

Quote:

The DB has to be pseudo localized, the other services have to be pseudolocalized, you'll have to create fully functioning mocks of 3rd party services that you can't get pseudolocalized. It becomes a big headache. That's why I say the effort doesn't really justify it.





We do pseudo-loc on the fly; meaning we read in the default lang (e.g. US-EN), and then modify chars, insert random chars, and extend length with chars based on targeted to full unicode or targeted locale.

Also, pseudo-loc way more powerful than simply checking for hard-coded strings.

--------------------
- Bj -
I.M. Testy blog
Testing Mentor


Post Extras: Print Post   Remind Me!   Notify Moderator  
TestingMentor
Member


Reged: 12/28/06
Posts: 235
Loc: Seattle, Washington
Re: How do you verify text presence in multi locale? [Re: dlai]
      #688641 - 10/14/11 04:09 PM

Quote:

The DB has to be pseudo localized, the other services have to be pseudolocalized, you'll have to create fully functioning mocks of 3rd party services that you can't get pseudolocalized. It becomes a big headache. That's why I say the effort doesn't really justify it.





We do pseudo-loc on the fly; meaning we read in the default lang (e.g. US-EN), and then modify chars, insert random chars, and extend length with chars based on targeted to full unicode or targeted locale.

--------------------
- Bj -
I.M. Testy blog
Testing Mentor


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 15 anonymous users are browsing this forum.

Moderator:  Elfriede Dustin, AJ, Joe Strazzere 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2367

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5