13
Abstract WWW (World Wide Web) is a platform for electronic-commerce, to share knowledge, social networking, online entrepreneurship and other information. A study reveals that English is the most preferred language for internet users (536.6 million), followed by Chinese (444.9 million), and Spanish (153.3 million). It is vital for business organization to develop and deploy websites across borders for the growth. Success of any product resides on its quality and conformance with requirements. Quality Assurance plays an extremely important role in delivering a product and also contributes significantly on the time to market aspect. Thus, helping business organizations to achieve their objectives. To improve the quality of multilingual applications, proper testing practices and guidelines should be in place with the help of multi-linguistics experts. Manual Testing of multilingual websites (as well as any other kind of applications) is time and resource consuming, whereas Automation Testing is one of the arenas which saves time and effort, increases accuracy, efficiency and repeatability for effective testing. This can be achieved by robust test automation frameworks. Author: NAVEENKUMAR NAMACHIVAYAM Keywords: Test Automation, HP QuickTest Professional, Globalization Testing, White Paper www.infosys.c Internationalization Test

Internationalization Test Approach - Full Whitepaper

Embed Size (px)

Citation preview

Page 1: Internationalization Test Approach - Full Whitepaper

Abstract

WWW (World Wide Web) is a platform for electronic-commerce, to share knowledge, social networking,

online entrepreneurship and other information. A study reveals that English is the most preferred language for

internet users (536.6 million), followed by Chinese (444.9 million), and Spanish (153.3 million). It is vital for

business organization to develop and deploy websites across borders for the growth. Success of any product resides

on its quality and conformance with requirements.

Quality Assurance plays an extremely important role in delivering a product and also contributes significantly on the

time to market aspect. Thus, helping business organizations to achieve their objectives. To improve the quality of

multilingual applications, proper testing practices and guidelines should be in place with the help of multi-linguistics

experts. Manual Testing of multilingual websites (as well as any other kind of applications) is time and resource

consuming, whereas Automation Testing is one of the arenas which saves time and effort, increases accuracy,

efficiency and repeatability for effective testing. This can be achieved by robust test automation frameworks.

In this paper, we shall understand different approaches to automate multilingual websites, which would help us

determine the model that best suits the business organization requirements and needs.

Author: NAVEENKUMAR NAMACHIVAYAM

Keywords: Test Automation, HP QuickTest Professional, Globalization Testing, Localization Testing, Test Approach, I18N, L10N

Wh

ite P

ap

er

www.infosys.com

Internationalization Test Approach

Page 2: Internationalization Test Approach - Full Whitepaper

Contents

An Overview - Internationalization/Localization/Globalization

Challenges in testing multilingual applications

Multilingual Testing Strategy

Test Automation Approach for Multilingual applications

Discussion on Case Studies

Conclusion and Benefits

Author: NAVEENKUMAR NAMACHIVAYAM

Page 3: Internationalization Test Approach - Full Whitepaper

An Overview - Internationalization/Localization/Globalization

For a business growth, it is vital important for any organization to deploy their products/services across

geographical locations. Internationalization or I18N is deploying products and services in different languages

and locales across the globe without any redesign. I18N Testing is the set of guidelines, practices, principles and

process to ensure the product/services is properly internationalized.

Localization or L10N is the process of transforming the products/services for a particular region/market. L10N

Testing is the process of ensuring the products/services is properly localized. Translation plays a critical role in

L10N. Also ensuring the products/services have aligned with locale such as Date, Time zone, Currency, Holidays,

Character Encoding and Linguistics are important. As localization testing involves primarily on translation and is

worthy to have multi-linguistics experts in place.

Globalization Testing ensures whether the products/services deployed is properly functioning for any selected

culture/locale.

Associations

Following are the few important organizations which promotes Internationalization.

World Wide Web Consortium (W3C) is the international standards organization for World Wide Web (WWW). The

W3c Internationalization works closely with W3C to promote internationalization in different languages and locales.

The Globalization and Localization Association is a non-profit and international association of companies which

enables translation, internationalization, localization, and globalization of products and services.

Localization Industry Standards Association (1990-2011) is a Swiss based trade body which enables

translation in different languages. However, LISA has been sunset.

Author: NAVEENKUMAR NAMACHIVAYAM

Page 4: Internationalization Test Approach - Full Whitepaper

Challenges in testing multilingual applications

As of Dec 2011, there are 121 millions of users in India accessing internet. 59% people accessing internet

via mobiles. 10% increase in Internet usage boosts the Gross Domestic Product (GDP) by 1.08 per cent#. This

shows that there is an enormous growth in internet usage in India.

It is very challenging to localize products/services for a country like India. India is a largest democracy country in

the world where 30 languages are spoken by millions native people and 122 languages spoken by more than the

10,000 people and 2371 dialects+. Also, India is a multilingual country with 22 official languages and 12 scripts.

Consider a sentence “India is the largest democracy in the world” in a teaching website for school students which

should be localize in all Indian languages. Below is the translation output from the language English to Tamil using

TDIL Machine translation. Here the output (refer Screenshot 1) is not as expected. It doesn’t translate the word

democracy properly and it has other grammatical and spelling errors.

Screenshot 1

Below output (refer Screenshot 2) is for the language Hindi, which translates a complex sentence which has

technical jargon.

Author: NAVEENKUMAR NAMACHIVAYAM

Page 5: Internationalization Test Approach - Full Whitepaper

Screenshot 2

But the output is completely muddled up. Literal translation of English to any Indian languages is a critical challenge to localize products/services. It will be more challenging to do the following tasks.

Styling, Indents, Line Spaces and Alignment (Vertical and Horizontal) Issues

Underlining characters in mantras/slogans

Bullets and Numbering formats

Browsers Compatibility

Multilingual Testing Strategy

Following are the key phases in testing multilingual products/services which ensures intuitive testing.

1. Test Environment Setup

To perform multilingual testing approach, it is important to have an isolated environment for each language for intuitive testing.

Consider a website testTalk.in which operates in two languages German and Japanese. Microsoft Language packs enable support for multilingual environment which reduces infrastructure costs in setting up test environment.

Next step is to ensure that the environment has Unicode Compliant OS and stable versions of browsers have been installed with UTF-8 encoding. Validate the font family and Regional and Language settings in the machines.

2. Application Under Test Study

When a QA team receives stable version of internationalized application, the important step is to validate the application is Unicode compliant and ability to handle multi-byte characters. Languages like Chinese and Japanese, uses multi-byte characters. Also ensure the backend of application has ability to store and retrieve Unicode data.

Validation of static strings like Titles, Menu Labels, Tool Tips, Splash Screen texts, Object’s labels, Table’s Row/Column headers/footers etc., should render it from Resource Bundles.

3. Test Case Design

Test Case Design is a critical task in Internationalization Testing. High priority should be given to test cases which involves User Interface and where the application under test is providing outputs. E.g. Report Generation in PDF/Word formats, Automatic Email Communication etc., across multiple languages. Also, Test Data which has multi-byte characters and combination of complex characters should be prioritized.

Table 1 shows the sample test scenarios for internationalization testing.

TC_ID Test Case Description

Expected Result

Actual Result Result (PASS/FAIL

)

IT_JAP_WEBMENU_HEADERS_1

Validate the web menu headers is properly translated in Japanese

All the web menus headers should be in Japanese with CENTER aligned.

All the web menus labels in Japanese but the text alignments are LEFT.

FAIL

IT_JAP_OBJECT_LABELS_2 Validate the objects labels are in Japanese in all the pages.

All the objects displayed in all the pages should be in Japanese

The entire objects labels in all the pages are in Japanese.

PASS

Author: NAVEENKUMAR NAMACHIVAYAM

Page 6: Internationalization Test Approach - Full Whitepaper

IT_JAP_ERROR_EXCEPTIONS_3

Validate all the error and exception messages displayed in Japanese

All the message boxes, pop-ups, Dialog boxes should display messages/exception messages in Japanese.

All the message boxes, pop-ups, Dialog boxes displaying messages/exception messages in Japanese

PASS

IT_JAP_IMAGES_4 Validate all the text and alternate text of the embedded images are displaying in Japanese.

All the text and alternate text of the embedded images should display in Japanese.

All the text and alternate text of the embedded images are displaying in Japanese.

PASS

IT_JAP_PRINT_5 Validate the pages are printing in Japanese (multi-byte characters)

Text should print in Japanese as it is on the screen when the user prints any pages.

All characters are getting printed in Japanese.

PASS

IT_HELPMANUAL_6 Validate the help pages displaying in Japanese.

All help pages should display in Japanese.

All help pages are in Japanese.

PASS

IT_SCREENRESOLUTION_7

Validate all the pages in different screen resolution.

All the pages should display properly in different screen resolutions as mentioned in Requirement document.

All the pages are displaying properly in different screen resolution as mentioned.

PASS

… … … … …

… … … … …

TABLE 1

Test Automation Alternative Approaches for Multilingual applications

Testing multilingual application manually is time and resource consuming. QA team should consist of technical and multilingual experts in a proper ratio. Automating multilingual applications would save time and resources. It leads to increase in efficiency, accuracy and speed. Right kind of framework in place helps organizations to boosts ready-to-go live period.

There will be lots of challenges to implement hybrid driven framework to test Multilingual. Following are the traditional method of automation multilingual applications. E.g. implementing test automation framework using QuickTest Pro (QTP) to automation testTalk.in website for multiple languages.

1. Method One – Implementing multiple ORs

Creating multiple object repositories (OR) for different languages and associating it run time. But maintenance of OR will be a nightmare for automation engineers.

Author: NAVEENKUMAR NAMACHIVAYAM

Page 7: Internationalization Test Approach - Full Whitepaper

2. Method Two – Implementing Switch statement

Implementing Switch Case statement in the test scripts in runtime is one simple method. But lines of code will get boosted if number of languages to test is more.

Select Case Language

Case “English”

Case “Japanese”

Case “French”

End Select

3. Method Three – Implementing Custom DictionaryImplementing custom dictionary helps to translate object’s names for identification. But this method might

lack in exact translation of AUT. Consider Google.com in English and French. Google Search button name is Google Search in English, in French it is Recherché Google. Custom dictionary function translates it to Google Recherché, not Recherché Google. Actual button of Google button in French is Recherché Google.

Refer below screenshots.

Google Search button properties using Object Spy in QTP

Recherché Google button properties using Object Spy in QTP

Screenshot 3 Screenshot 4

4. Method Four – Implementing Descriptive Programming/Regular Expressions

Implementation of Descriptive Programming is the most efficient way of automating multilingual products. Blend of descriptive programming and right kind of hybrid framework expedites the process of automation. Also, by using Regular Expressions in the OR reduces the number of objects and enhances the object identification.

Following Case study explains the feasible implementation of Test Automation approach for Internationalization Testing.

Discussion on Case Studies

Author: NAVEENKUMAR NAMACHIVAYAM

Page 8: Internationalization Test Approach - Full Whitepaper

Case Study OutlineWe shall discuss on which test automation approach would be feasible to test multilingual applications by

taking an example of two websites Google.com and HP.com. We shall see, how Google and HP built objects in their multilingual websites and perform object analysis on Google.com, Google.fr and HP US website, HP France website. This examination study reveals the feasible approach for test automation for Google and HP.

QTP spy utility is used to examine Google and HP websites to scan the objects and its applicable properties. This case study gives an insight on test automation of multilingual applications.

Google.com and Google France

Object Identification is a critical phase in test automation for any type of User Interface based applications. In this scenario, we will see how Google Search button object has been identified.

Google Search and Recherché Google button on Microsoft Internet Explorer (IE) 6 has been object spied using QTP and retrieved all the properties as shown above Screenshot 3 and 4 respectively. There is/are no property to identify uniquely Google Search/Recherché Google button.

But, there is a HTML ID description property if Google Search is getting identified using IE 8, refer Screenshot 5. In IE 6, HTML ID property is BLANK.

Google Search button identification using QTP in IE 8

Screenshot 5

HTML ID is a unique ID for an HTML element. It identifies Google Search button irrespective of any language. By incorporating, HTML ID property using Descriptive Programming identifies Google Search button in any language. Below is the code snippet.

Browser("title:=Google").Page("title:=Google").WebButton("html id:=gbqfba").Click

HP India and HP France

Following are the websites of HP India and HP France: http://www8.hp.com/in/en/home.html & http://www8.hp.com/fr/fr/home.html respectively. Below are the screenshots of object properties of “Support & Drivers” and “Support et Pilotes” link in HP India and HP France websites.

Author: NAVEENKUMAR NAMACHIVAYAM

Page 9: Internationalization Test Approach - Full Whitepaper

Screenshot 6Object Properties of Support & Drivers

Screenshot 7Object Properties of Support et Pilotes

Property text would change for selected languages. It will not help to identify the link uniquely. HP website’s objects can be uniquely identified using additional properties such as outertext and innertext.

The value of outertext and innertext is unique in both the languages i.e. English and French. By incorporating, innertext or outertext property using Descriptive Programming identifies Support & Drivers link in any language.

Additional Properties of Support et Pilotes linkScreenshot 8

Additional Properties of Support & Drivers linkScreenshot 9

Browser IE 6Outertext property has been added to Support et Pilotes & Support & Drivers link to identify uniquely irrespective of language. Refer above Screenshot 8 and 9.

The naming conventions of HP India and HP France URLs are intuitive which helps automation engineers to parameterize the URL.

HP India http://www8.hp.com/in/en/home.html : in for India - country; en for English - language

HP France http://www8.hp.com/fr/fr/home.html : fr for France - country; fr for French – language

Author: NAVEENKUMAR NAMACHIVAYAM

Page 10: Internationalization Test Approach - Full Whitepaper

Conclusion and Benefits

To implement test automation for Internationalization testing, it is important to study the object’s implementation in AUT. Browser selection plays an important role to spy the objects. Above case study reveals that, it is vital to identify the unique property of the objects irrespective of the language for ease of automation. Blend of Descriptive Programming and optimized OR is an ideal and robust approach to implement Internationalization Test Automation.

Following are the People, Process and Technology benefits of Internationalization Testing to the clients.

People Benefits

Increase in Client Value Cost Savings Test Automation expertise Minimum support from Multilingual experts

Process Benefits

Leads to Innovation Faster Time-to-market

Technology Benefits

Utilization of Testing Tools Less effort on rework and maintenance

Author: NAVEENKUMAR NAMACHIVAYAM

Page 11: Internationalization Test Approach - Full Whitepaper

About the Author

NaveenKumar Namachivayam has nearly five years of industry experience. Currently, he is working as a Performance Test Engineer for Insurance domain at Infosys Limited. He specializes in Test Automation and Performance Testing. He has been part of the process, recommending Test Automation and Performance testing tools for clients.

In the last five years, he has independently handled Proof of Concepts on Performance Testing and Test Automation for regular expressions various clients.

As a trainer, he has enabled more than 450 employees across various business units on Test Automation and Performance Testing front.

He specializes in QTP, LoadRunner, Jmeter, QC and Excel Macros. He can be reached at catch[dot]nkn[at]gmail.com

http://naveenkumarn.in | http://www.linkedin.com/in/naveenkumarn | www.facebook.com/catchnkn | https://twitter.com/catchnkn

References and Resources

#Joint report by Indian Council for Research on International Economic Relations (ICRIER), The Internet and Mobile Association of India (IAMAI) and the Department of IT

http://www.business-standard.com/india/news/internet-penetration-to-boost-indias-gdp/462368/ +Census India Report 2011 - http://censusindia.gov.in/ Internet World Stats http://www.internetworldstats.com/stats7.htm W3C http://www.w3.org/standards/webdesign/i18n and http://www.w3.org/International/

LISA - http://www.commonsenseadvisory.com/Default.aspx?Contenttype=ArticleDetAD&tabID=63&Aid=1357&moduleId=390

Understanding Language Packs - http://technet.microsoft.com/en-us/library/cc766472%28v=ws.10%29.aspx

Indian Language Technology Proliferation and Deployment Centre http://tdil-dc.in I18N Testing Guidelines and Techniques - http://developers.sun.com/solaris/articles/i18n/I18N_Testing.html

About Infosys

Many of the world’s most successful organizations rely on Infosys to deliver measurable business value. Infosys provides business consulting, technology, engineering and outsourcing services to help clients in over 30 countries build tomorrow’s enterprise.

For more information about Infosys (NASDAQ:INFY), visit www.infosys.com.

For more information, contact [email protected] www.infosys.com

Author: NAVEENKUMAR NAMACHIVAYAM

Page 12: Internationalization Test Approach - Full Whitepaper

© Infosys Limited - 2012

Author: NAVEENKUMAR NAMACHIVAYAM