What is The Turkey Test?

TestingLocalizationInternationalizationTurkey Test

Testing Problem Overview


I came across the word 'The Turkey Test' while learning about code testing. I don't know really what it means.

What is Turkey Test? Why is it called so?

Testing Solutions


Solution 1 - Testing

The Turkey problem is related to software internationalization or simply to its misbehavior in various language cultures.

In various countries there are different standards, for example for writing dates (14.04.2008 in Turkey and 4/14/2008 in US), numbers (i.e. 123,45 in Poland and 123.45 in USA) and rules about character uppercasing (like in Turkey with letters i, I and ı).

As Jeff Moser pointed below one such problem was pointed out by a Turkish user who found a bug in the ToUpper() function. There are more details in comments below.

However the problem is not limited to Turkey and to string conversions.

For example, in Poland and many other countries, dates and numbers are also written in a different manner.

Some links from a Google search for the Turkey Test :

Solution 2 - Testing

Here is described the turkey test

> Forget about Turkey, this won't even pass in the USA. You need a case insensitive compare. So you try: > > String.Compare(string,string,bool ignoreCase): > > .... > > Do any of these pass "The Turkey Test?" > > Not a chance! > > Reason: You've been hit with the "Turkish I" problem. > > As discussed by lots and lots of people, the "I" in Turkish behaves differently than in most languages. Per the Unicode standard, our lowercase "i" becomes "İ" (U+0130 "Latin Capital Letter I With Dot Above") when it moves to uppercase. Similarly, our uppercase "I" becomes "ı" (U+0131 "Latin Small Letter Dotless I") when it moves to lowercase.

Solution 3 - Testing

We write dates smaller to bigger like dd.MM.yyyy: 28.10.2010

We use '.'(dot) for thousands separator, and ','(comma) for decimal separator: 4.567,9

We have ö=>Ö, ç=>Ç, ş=>Ş, ğ=>Ğ, ü=>Ü, and most importantly ı=>I and i => İ; in other words, lower case of upper I is dotless and upper case of lower i is dotted.

People may have very stressful times because of meaningless errors caused by the above rules.

If your code properly runs in Turkey, it'll probably work anywhere.

Solution 4 - Testing

The so called "Turkey Test" is related to Software internationalization. One problem of globalization/internationalization are that date and time formats in different cultures can differ on many levels (day/month/year order, date separator etc).

Also, Turkey has some special rules for capitalization, which can lead to problems. For example, the Turkish "i" character is a common problem for many programs which capitalize it in a wrong way.

Solution 5 - Testing

The link provided by @Luixv gives a comprehensive description of the issue.

The summary is that if your going to test your code on only one non-English locale, test it on Turkish.

This is because the Turkish has instances of most edge cases you are likely to encounter with localization, including "unusual" format strings and non-standard characters (such as a different capitalization rules for i).

Solution 6 - Testing

Jeff Atwood has a blog article on same which is the first place I came across it myself. in summary attempting to run your application under a Turkish Locale is an excellent test of your I18n.

here's jeffs article

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDhanapalView Question on Stackoverflow
Solution 1 - TestingGrzegorz GierlikView Answer on Stackoverflow
Solution 2 - TestingLuixvView Answer on Stackoverflow
Solution 3 - TestingnerknView Answer on Stackoverflow
Solution 4 - TestingsplattneView Answer on Stackoverflow
Solution 5 - TestingRichardView Answer on Stackoverflow
Solution 6 - TestingTygerKrashView Answer on Stackoverflow