How Do You Write Test Cases for a Text Box?

.
Sample Test Cases for Text Box

Hello Folks,

In this tutorial, we will learn how to write test cases for a text box. We will also learn about positive test scenarios and negative test cases for text box.

Every application whether it is a web application or mobile application has a textbox for its functionality. There are many types of text input box eg. name Text box, Address Text box, Zipcode Text box etc. In this tutorial, we are going to learn how to test the text box.

What are the Test Cases For Text Boxes?

Here!!! Some of the important Test case for Text Field is given...


UI Test Cases For Text Box

  • Check whether the text box is properly visible to the user or not.
  • Verify the alignment and placement of the text box on the page as per requirement or not.
  • Check whether the placeholder and label are as per requirement and visible to the user or not.
  • Check whether the colour, font and size are as per requirement or not.
  • Verify the alert message when the user enters the invalid data.
  • Check the responsiveness of the field.
  • Verify the behaviour of the text box when the user controls through the keyboard.

Functional Test Cases for Text Box

  • First, verify that the user is able to click on a text box or not.
  • Check whether the user is able to type in the text box or not.
  • Check whether the typed text is properly visible to the user or not.
  • Verify the text box by entering the alphanumeric characters. 
  • Check for the alphabet is accepted in upper and lower case both.
  • Test the text box by entering the special characters (e.g., @, #, $). 
  • Verify the text box when the user provides empty input. 
  • Verify the text box maximum and minimum character limit. 
  • verify the undo and redo functionality within the text box. 
  • Check that users can copy and paste text from and to the text box or not. 
Positive Test Scenarios for Text Box
Negative Test Scenarios for Text Box
Test Cases for Text Field Validation

Inputs For Text Box Field

  • Max Length of chars 
  • AlphaNumeric 
  • numeric 
  • Min Length of chars 
  • Space Between words 
  • Leading and Trailing Spaces 
  • Special Char 
  • Unicode Char 
  • <script>alert("123")</script> 
  • user@Testers.com 
  • Bala12061911 
  • </br> 
  • alert("Bala") 
  • SQL Injection



Hope !! The Above Test case for Text Box is Helpful For you ...

Team,
QA acharya

Also Read:
How to Handle TextBox In Selenium Webdriver Using Java?


Share Your Knowledge With Us -
Mail your content - qaacharya.in@gmail.com

Test Cases For Text Box