Interview Questions

Text Field Validations

Mercury WinRunner FAQ

(Continued from previous question...)

Text Field Validations

Need to validate text fields against
1. Null
2. Not Null.
3. whether it allows any Special Characters.
4. whether it allows numeric contents.
5. Maximum length of the field etc.

1) From the requirements find out what the behaviour of the text field in question should be. Things you need to know are :
what should happen if field left blank
what special characters are allowed
is it an alpha, nemeric or alphanumeric field etc.etc.

2) Write manual tests for doing what you want. This will create a structure to form the basis of your WR tests.

3) now create your WR scripts. I suggest that you use data driven tests and use Excel spreadsheets for your inputs instead of having user input. For example the following structure will test whether the text field will accept special characters :

open the data table
for each value in the data table
  get value
  insert value into text field
  attempt to use the value inserted
  if result is as expected
    report pass
           report fail
   next value in data table
in this case the data table will 
contain all the special charcaters

(Continued on next question...)

Other Interview Questions