Field Level Validation An Important Aspect of Manual Testing. Say I have a form that is having n number of data entry points commonly referred as field (input). So while testing the page we should look in details of the field level validation also. Any simple miss here can lead to a serious data loss in live environment.
I am writing some common validation rules for this page which are quick and needs to be incorporated in the start of page level testing of GUI Testing.Most of the validation rules should come from software requirement Specification document(SRS). We will point out the cases from it. Or else in a joint call with Developer, Customer, Subject Matter expert and database designers we can clarify this point.Also remember I would not prefer these points to be tested through Automation if this is not Banking or any data sensitive project.
While checking the data type of any text field please takes care of the followings:-
Lets us consider the a case –the field is “First Name VarChar (100)”
- The field should accept only alphabets. For E.G:- [A-Z] [a-z]
- The field should accept only numbers. For E.G:- [0-9]
- The field should accept only special characters. For E.G:- [!@#$%^&*()_]
- The field should accept only European characters. For E.G:- [http://www.alanwood.net/demos/wgl4.html]
- The field should accept combination of alphabets. Numbers, special characters and European characters. For E.G:- [[a-z, A_Z,0-9,!@# $ %^&*()_:;”’><,./ and European characters]
- Go for Boundary value analysis. For E.G:- [below 100,100,above 100]
- Check whether the same data is persisting in the next step or not. For E.G:- [if you enter first name as “XYZ” it should be the same in next all the work step.
- If the field is mandatory then it should not be bypassed
- It should accept only 100 character. There might be cases where 99,100,101 characters should be tested for integrity.
- There are some derived test cases like first name can not contain only number or alpha numeric characters.
- The initial control value is the mask combined with the value of the field.
- The end user can insert any character into the Alpha field. If an Alpha field has a picture that consists only of upper or lower case characters, or numbers only, the validation can be done on the fly. The same can be done with Numeric fields that consist of number slots (‘#’) only.
- The end user can insert any character into Numeric, Date, or Time fields. After exiting from the field, the string is evaluated and validated by comparing it to the field picture and type.
- If the end-user input does not comply to the field mask, the previous value is returned.
- If the data received after evaluation cannot be correctly interpreted for the given field, it returns the previous value.
- After the evaluation and validation of the data, the string appears in the input field. If the previous value is returned, a message appears on the status bar and the focus is returned to the corrected field.
Till now this is what I have…I will come back once I have updated my knowledge. Till then Thank you.
This article is written by Sourav Mukherjee. A Test lead in a leading Software industry. Hope this will help you to understand Field level validation.