How to test a Text Box?

Hi!
Welcome to the series of ‘How to Test’.From now I thought of concentrating some of the fields which are seen on a web page.I hereby start with a simple text box in this post.

Requirements:
1) I have a simple text box of certain size,maximum length.
2) A button which on click will save the data entered in the text box into the database.
3) For each record inserted into the database a new unique id is generated.

How will you get the page:
1) Type the URL in the browser
2) Press Enter key present on the keyboard.
3) You will be able to see the Text box,button on the page.

OK,now we start our test ideas:
My Text box can accept all types of data like alphabets,numeric,special characters,Null,space etc.

Checking the default values:
1)Check the default values of the button,text box,which should be enabled and text of the text box should be null.

Checking the NULL condition:
2)Click on the save button.
If the requirement mentions that: you can save a record with null value then the above case is correct,else the above is bug

Checking the Space condition:
3)
i) Press space bar present on the keyboard for sometime so that an empty space gets inserted into the text box
ii) Click the button

If record saving with space as a valid value then it is not an issue else it is an bug.

4)
i) Copy some empty space somewhere say I copied from a notepad and paste in the text box.
ii) Click the button

If record saving with space as a valid value then it is not an issue else it is an bug.

Checking the Boundary value condition:
5)
i) Enter data in the text box less than the minimum value
ii)Click on Save button

An Error Message should be seen.Else it is a bug.

6)
i) Enter data in the text box equal to the minimum value
ii)Click on Save button

Should get saved.Else it is a bug.

7)
i) Enter data in the text box greater the maximum value
ii)Click on Save button

An Error Message should be seen.Else it is a bug.

8)
i) Enter data in the text box equal to the maximum value
ii)Click on Save button

Should get saved.Else it is a bug.

9)
i) Enter space in the text box equal to the maximum value of the database.
ii)Maximum+1 value equals some valid character
iii)Click on Save button

Should give an error message if space is not a valid value.Else it is a bug.

10) Above can tried even with the copy and paste operation.

Field should accept only alphabets.
11)
i)Enter Alphabetic text
2)Click on the button
Should get saved else it is a bug

12)
i)Paste Alphabetic text
2)Click on the button
Should get saved else it is a bug

13)
i)Enter/Paste Numeric Value/Special characters/Html Tags/Single quotes/Double quotes
2)Click on the button
Should get an error,else it is a bug

Numeric:Rational Numbers,Decimals,Integers,Complex Numbers
Special Characters:!@#$%^&*(),[ALT+124] etc
HTML Tags: Starting Angle Bracket HTML Ending Angle Bracket
Single Quotes: ‘
Double Quoted:”

Checking Trim Functionality
14)
i)Enter Space followed by name
ii)Click on the button
Data has to be trimmed and should get saved else it is a bug

14)
i)Enter Space prefixed to name
ii)Click on the button
Data has to be trimmed and should get saved else it is a bug

15)ENTER VALUE WITH SINGLE QUOTE AND ‘&’ AND VALUES LIKE ~!@#$%^&*()_
These are some of the test ideas I can see when I want to test single text box.

In summary depending upon your requirements and other fields inter linkage, a number of test ideas can be generated.

Before I say a complete bye bye for this post, I have here the MSDN SITE where you can find all the possible properties of text box which will defintely add some more ingredients to your testing.

If you feel I have left out any test ideas in testing the text box,please suggest/comment me.

For further improvement suggestions,please mail me :pavanturlapati@gmail.com

Happy Testing 🙂
Thanks & Regards,
Pavan Turlapati
— Testing became my passion from profession.

20 Responses to “How to test a Text Box?”


  1. 1 eywryt September 3, 2007 at 5:49 am

    chgvoibl;ijiilbh9u np bo iob yhiohbnil liunh bojo mljhn gio gilmnhlkhiougihjlhurvdybgnhjbnmljgftfgbh oniujohmce

  2. 2 palanisamy September 3, 2007 at 5:55 am

    without requirement how to check the text box. how many test cases can able to wite.

  3. 3 Abhi April 3, 2008 at 11:26 am

    good one dude..

    keep posting

  4. 4 Testing February 9, 2009 at 4:36 pm

    !@#$%^&*(),[ALT+124]

  5. 5 Thyer June 23, 2009 at 5:26 pm

    I would try to run a SQL injection attack as well. Whenever saving data to a database security should be on your mind.

  6. 6 yo December 2, 2009 at 5:35 am

    really enjoyed watching auditions today!

    More Shakespeare:

    Your breath casts sweet perfumes.

    Your words like music please me.

    You, like a comet, do attract all eyes.

    You are the star I reach at.

  7. 7 Pankaj May 24, 2010 at 12:24 pm

    Good stuff….please add more like this.

  8. 8 Enrique Terrer December 17, 2010 at 11:59 am

    Hi.

    Very useful.

    But I need information about testing email format. Do you have information or links??

    Thanks and sorry from my english (I´m spanish) 😉

  9. 9 smart January 21, 2011 at 8:30 am

    Very nice……great job done

  10. 10 mohit February 28, 2011 at 5:53 am

    Thts really awaysome dude… good observation

  11. 11 RS November 5, 2011 at 7:22 am

    some more information about testing a textbox otherwise its gud

  12. 13 Small Tester July 10, 2012 at 7:31 am

    Very Nice

  13. 14 Samir August 29, 2012 at 9:52 am

    how the field should save only spaces as characters and there is no any alphabetical word!!??

  14. 15 Joan May 28, 2013 at 8:09 pm

    Major follows some sports, primarily during the playoffs.
    The player who spins the coin is referred to as the spinner.

    This classic game integrates all-out entertainment with vocabulary enhancement
    in one amazing game.

  15. 16 Karolin July 15, 2013 at 8:40 pm

    You don’t have to hit the gym for two and three hours each day to lose weight, but it does help to squeeze in 30 minutes of physical activity each day. Authorities inside the area will need to have an intensive understanding of laboratory and labeling techniques, infection security precautions, appropriate blood attract approaches to the elderly and for infants and even more. Do not be tempted to lose weight as quickly as you can, because a crash diet will have you eating less than a thousand calories a day slowing down your metabolism.

  16. 17 soultw.com July 29, 2013 at 10:48 am

    You don’t have to hit the gym for two and three hours each day to lose weight, but it does help to squeeze in 30 minutes of physical activity each day. Avocados- Although not my favorite, are high in fats, the good ones. Many people don’t have the time to weight themselves every day, but checking the
    scale on a regular basis can definitely help when you’re working to lose weight and keep it off.

  17. 19 fabio November 27, 2014 at 5:57 pm

    maybe its missing the virtual keyboard test

  18. 20 Tun Lin Thu September 9, 2015 at 7:00 am

    Thanks, learned a lot


Leave a comment