Test Text Field

How many possibilities are there to test a text field? What are they?

Questions by pavankumarreddy

Showing Answers 1 - 10 of 10 Answers

If my understanding is right. You can test the below conditions, which are BVA.
(If assumed the max length is 10)
1. Leave the field blank.(0)-If the requirement says the field is mandatory then this test should fail. If not should allow to leave it blank.
2. Enter any text with length max-1(9)
3. Enter any text with maximum length(10)
4. Enter any text with length max+1(11)

In Most cases ECP is not defined. But if its defined for example the requirement is A-Z,a-z and 0-9 are the only valid set.
Then you can test the below conditons:
1.It should give an error when a spl character is entered.
Depending on the priority of the the requirement. You can test different conditions like.a) having a spl char at start
b) having a spl char at the end. and etc.



A Text field can test as follows.

-> Leave it as empty, submit and verify whether the validation message is shown
( if it's a mand field)

->  Leave it as empty, submit and verify that the validation message will not be shown ( if it's a opt field)

-> Enter large data and verify how it's validating the data

-> Enter zero (0), submit the page and verify that the val message is shown if it's type of date or DOB ..etc

-> Enter special characters like !@#$%^&*()_, submit the page and verify how it's valuidating the data

-> Enter negative values, submit the page and verify how it's validating

-> Enter Float values, submit the page and verify how it's validating

Srinivas

B.V.Kumar

  • Oct 13th, 2008
 

First of all one need to find the purpose of text field.whether the field is to enter text data or numeric data or alphanumeric data.Then go for BVA.This will not only save the time but also makes easy to prepare text data.

Regards,
B.V.Kumar.
  

B.V.Kumar

  • Oct 13th, 2008
 

First of all the tester need to find the purpuse of the text field from the requirements. Based on the requirement need to prepare test data.
There are two possilble ways to test a text field,
1) Boundary Value Analysis
2) Equivalence Class Partition.

B.V.Kumar

goksn

  • Aug 25th, 2009
 

The shortest answer in interview to this question is "It depends up on the requirement".

As a tester I need functional spec for this text field.

After getting the functional spec, testers can prepare "Input field matrix" using the following techniques (but within the limit of functional spec)

BVAnalysis
Eq.Class
Knowing how many ways a field can be edited either directly or through some other field.

rahulskin

  • Sep 17th, 2009
 

Writing the test cases for Text field required the Requirement specification for the Text field.
At the broad view you can write the test cases using the following details.
1) You can write test cases for BVA.
2) Test for Blank text field.
3) Enter Blank spaces in the text field.
4) Test Blank spaces + some text e.g. "        ABCD".
5) Test some text + Blank spaces e.g. "ABCD        ".
6) Some text + Blank spaces + Some text  "        ABCD      "
7) Test case with Valid input.
8) Test case with Invalid input.
9) Test case using the special characters.

  Was this answer useful?  Yes

Before you begin testing, review the functional requirements, specifications, and/or wireframes to determine how these text fields are used.  Are there any mandatory fields?  Are certain fields hidden until values in previous fields are populated with specific values?  What is the maximum number of characters that each of these fields can accommodate?  Does any of these fields require special validation such as phone number format (Ex. 206-930-2030)?

TEXT FIELDS THAT ACCEPT ONLY NUMBERS FOR ARITHMETIC OPERATIONS
1) Author tests cases that perform boundary value analysis using the smallest decimal value as the increment.  For example, if the range of numbers accepted in a text box is 0.0 to 100.0, then author the following tests
   a) Enter -0.1 in text box; expect appropriate validaton message 
   b) Enter 0.0 in text box; expect operation to complete
   c) Enter 0.1 in text box; expect operation to complete
   d)  Enter 99.9 in text box; expect operation to complete
   e) Enter 100.0 in text box; expect operation to complete
   f) Enter 100.1 in text box; expect appropriate validation message
2)  Author test cases that test negative scenarios
   a) Enter no value (null); expect appropriate validation message
   b) Enter alpha character; expect appropriate validation message
   c) Enter special character(s) (such as #); expect appropriate validation message

TEXT FIELDS THAT ACCEPT NON-ARITHMETIC ALPHANUMERIC VALUES
   1) Enter a - z; A - Z; expect page to submit
   2) Enter 0 - 9; expect page to submit
   3) Enter valid special characters (! @ # $ ^, etc); expect page to submit
   4) Enter invalid characters defined by spec; expect proper validation message

TEXT FIELDS THAT REQUIRE A SPECIFIC RANGE OF ALPHANUMERIC CHARACTERS
For our purposes, let's assume the specification tells us that the range is from 4 to 16 characters.
   1) Enter 3 characters (lower limit of range - 1); expect proper validation message
   2) Enter 4 characters (lower limit of range); expect page to submit
   3) Enter 5 characters (lower limit of range + 1); expect page to submit
   4) Enter 15 characters (upper limit of range - 1); expect page to submit
   5) Enter 16 characters (upper limit of range); expect page to submit
   6) Enter 17 characters (upper limit of range + 1); expect proper validation message

TEXT FIELDS THAT MUST BE POPULATED (OR MANDATORY) IN ORDER TO SUBMIT
   1) Enter valid data in all mandatory fields; pass if you are able to submit
   2) Enter no data in field; pass if proper validation message is displayed

TEXT FIELDS THAT ARE NOT MANDATORY IN ORDER TO SUBMIT
   1) Enter valid data in all fields; pass if you are able to submit
   2) Enter no data in non-mandatory fields; pass if you are able to submit

TEXT FIELDS THAT ARE HIDDEN UNTIL SPECIFIC BUSINESS LOGIC TRIGGERS THEM
   1) Perform steps that should produce hidden text field; pass if field becomes visible
   2) Perform steps around functionality that should not display hidden text field; fail if hidden field becomes visible 

One other possibility not mentioned above.

On international web sites the character set may very well change, e.g. English in one region, Japanese in another.

Test that only valid sequences are allowed, e.g. strictly a sequence of English letters, strictly a sequence of Japanese and put a sequence that has a mixture of both

  Was this answer useful?  Yes

Usha_s

  • Jul 29th, 2010
 

If the field accepts positive numeric values
1. Test for max length
2. Test for negative value
3. Test Boundatory values
4. Test Equivalance

If alpha numeric
1. Test for max length
2. Test for special char

  Was this answer useful?  Yes

iantulank

  • Aug 29th, 2017
 

I think B.V. Kumar has the best and correcct answer.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions