I'm testing an application which has chatrooms, where the users will input emoticons while chatting each other. The user will input the various types of smiley/emoticons in it.

How can I write a test case for emoticons?


User input will be converted to image. E.g., smile icon will be shown in place of :) string. The smileys will be integrated into the Java chatroom.

  • 1
    -1: Consider expanding your question. An emoticon has a lifecycle within a program, and there are too many places where it can appear: upon input, it may be text parsing (as noted by @corsiKa) or clicking on a supplementary toolbar, or both at the same time; at database level, they might be stored in a special manner (e.g. if the emoticon set is dynamic) or, again, stored as plain text; they may be retrieved and displayed in a certain manner; the missing identifiers must be processed somehow, and so on. Without knowing your app, your question is unlikely to be answered. – bytebuster Jan 4 '13 at 0:25
  • @bytebuster i expanded my question as per your comments – BlueBerry - Vignesh4303 Jan 4 '13 at 4:59
  • So user input will be converted to image? – dzieciou Jan 4 '13 at 6:19
  • Should a program reject emoticons that are not in the set of images or just avoid converting them? – dzieciou Jan 4 '13 at 6:20
  • @dzieciou yes exactly user input would be converted as image – BlueBerry - Vignesh4303 Jan 4 '13 at 7:41

You write this test case the same way you would write any other.

  1. Understand the requirements
  2. Understand all the variables of interest (in this case emoticons)
  3. Determine how to set the variable to the desired values (Input the emoticons)
  4. Determine how to verify that the expected results occur
  5. Check if unexpected results occur

For your system, how is the "smiley/emoticons" feature different from any other feature you are testing?

| improve this answer | |
  • 1
    I would beware of overlapping emoticon grammars. For example the system might allow a smile face to be forward or backward, like :-) or (-:. Same with frowns, like :-( or )-:. But what if there's :-)-: is it :-{backfrown} or {smile}-:. That's the only real tricky thing I can think of in this case. – corsiKa Jan 3 '13 at 15:55
  • @corsiKa, that's a good test, assuming the emoticon grammar is text based. – Joe Strazzere Jan 3 '13 at 22:12
  • @JoeStrazzere i have updated my question please review it sir – BlueBerry - Vignesh4303 Jan 4 '13 at 7:41
  • 1
    @vignesh4303 I see your update, but my response is the same - test it as you would any other feature. In this case, you should be able to come up with some "interesting" combinations of characters as input, depending on the requirements/specs. – Joe Strazzere Jan 4 '13 at 12:16

Joe provides a good generic template for any test. But, you don't really provide enough information in your question. Are the emoticons in your app font based or embedded images, or both? Some specific considerations for testing emoticons (or emoji) that you might want to consider include:

  • does your app have a function that enables the user to input 2 or more typographical characters that are converted to a graphical image (usu. gif) embedded in the html or rtf stream? If so, when does the conversion/mapping occur? What are the valid/invalid key combinations?

  • does your app also provide soft input of emoticons via a popup list/table or soft keyboard? If so, these emoticons may be font based rather than an embedded image. In this case, you might want to check if the emoticons are displayed correctly or at all on other apps or across the network. Many new emoticons are Unicode surrogate pair characters and not supported on all platforms or by all apps (esp cloud apps) (e.g. Facebook and Twitter are horrible at dealing with newer emoticons see testing with surrogate pair characters). Also, not all platforms, devices, etc., support all the emoticons defined in Unicode 6.2

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.