About me

Wednesday, August 24, 2011

Input Data Validation



Every web application is expected have at least one submit form. Data entered in form is transferred as input to database or to any other application and will decide the output. So, input data plays a very important role in retrieving the output data.

Such data needs to be validated by the code. And tester has the responsibility of validating such data.
At this point tester thinks about how can the validations be done and what type of data should be provided to validate the input field. Test data needs to be created and passed to the form through the automation tool or manually.

Here are few steps or guide lines to validate the data.

Let’s consider a sample form which acts as input to signing in as new member in a social networking site like facebook. It contains different types of input fields – Numeric, String, Alpha Numeric, date, preset values (from drop downs or check boxes), file uploads and Email addresses.

Name: String input field
Password : Alphanumeric field
Age: Numeric input field
Address: Alpha numeric
Date: Date of Birth
Email Address: Email field
Profile Image: Photo of the member: File upload

Validations which can be performed on such forms are

1.      Name :
a.       Should start with letter
b.      Should not contain numbers.(unless proposed)
c.       Should contain string characters only.
d.      Can contain underscore (_) ,hyphen  (-) and single quotation (')
e.      Can contain space but along with string characters
2.      Password :
a.       Should be encrypted with any special character and should not be visible even to the person who is entering it. Generally it gets skipped from encrypting when it is passed through any testing tool.
b.      Can contain string characters, numerical and special characters.
c.       Should not contain only spaces
d.      Length factor should be tested.
3.      Age :
a.       Should start with number
b.      Should not contain characters
c.      Should contain numbers only
d.      Should not contain special characters and spaces also
e.      Should not have all zeroes or single 0
4.      Address :
a.       Can contain string characters, numeric, special characters.
b.      Should contain only spaces
c.       Should not contain junk data, it should be meaningful
5.      Date :
a.       Can contain numbers
b.      Can contain special characters like hyphen (-),slash(/) depending on format accepted
c.        Can contain string characters depending on format
d.      Some cases should not accept future date like for date of birth we cannot put future date.
e.      Some cases should not accept past date like for any activity which is planned for future date.
6.      Email Address :
a.       Can contain numeric, string and special characters
b.      Should not contain only special characters or numbers
c.       Should not contain only spaces
d.      Should contain at least one at symbol (@)
e.      Should contain at least one dot (.)
7.      Profile image :
a.       Should be a path to the file which is to be uploaded
b.      File should be existing
c.       File format should be acceptable with the input field
d.      File size should be in the limits mentioned
8.      Apart from above we should also check the following in the input provided
a.       Length acceptable in the field
b.      Minimum length criteria is accepted or not
c.       Is the field mandatory ---then input is must and no spaces and all zeroes should be accepted.
d.      More number of spaces provided at the end or in between or at start of the data should be trimmed.
e.      Data in the form of SQL queries should not be accepted as they are provided to break the security system by hackers.
f.        Date which has HTML tags should not be provided. As they might be interpreted in different form when submitted as input data.


Points to be noted by developer when submit forms are designed

1.       Highlight the mandatory fields either by asterisk (*) or text “Mandatory” or coloring the text box in differentiating color.
2.       Mention the acceptable format near the date field.
3.       Mention the max length for the input fields which has limit restrictions.
4.       SQL queries should be identified and rejected.
5.       Same with HTML tags, they should be identified before passing the data.
6.       Errors should be in red. Or fields which have incorrect data should be highlighted in red.
7.       Provide the error message near each error field. Or provide all the errors in one section of the page mentioning the data field names clearly.




More Info


For Developers, these links below will help you a lot about what should be considered for data validation.

https://www.owasp.org/index.php/Data_Validation

http://www.clerkendweller.com/2008/11/21/Free-Text-Form-Field-Data-Validation

32 comments:

Anonymous said...

Great Post

Mansoor said...

Very helpful post!!

Thanks a ton.....

software testing training in chennai said...

Thanks for sharing informative post on white box testing. Your post helped me a lot to understand the difference between the white and black box testing.

Emi Jackson said...

Digital Marketing Training

Thanks for sharing this informative blog. Recently I did Digital Marketing courses at a leading digital marketing company. It's really useful for me to make a bright career. If anyone wants to get Digital Marketing Training in Chennai visit infiniX.

jack wilson said...

Digital Marketing Chennai

Thanks for sharing this informative blog. Recently I did Digital Marketing courses at a leading Digital Marketing Training Institutes in Chennai. It's really useful for me to make a bright career. If anyone wants to get Digital Marketing Training in Chennai visit infiniX.

Regards...

Digital Marketing Courses in Chennai

dhanamlakshmi palu said...

This is certainly one of the most valuable article. Great tips from beginning to till end. Lot of information are available here.Super article.
SEO Training in chennai | SEO Training chennai | SEO Course in chennai | SEO Course chennai

dhanalakshmi palu said...

Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post.
Web designing Training in chennai | Web designing Training chennai

kovalan Jayamurugan said...

Thanks for your informative article. Your post helped me a lot in understanding the career prospects in search engine optimization. Digital Marketing Training in Chennai | Digital Marketing Course in Chennai

mythily mythu said...

Very helpful post!!
oracle training in chennai

SKARtec SEO said...

Thanks for sharing this with us it is a worth read. xcellent post!!! Digital marketing training provides students with meaning skills to promote a business in digital age. This training covers search engine optimization, SEM, social media marketing, online reputation management, etc.

Digital Marketing Training in Chennai | Digital Marketing Course in Chennai | Digital Marketing Training Institute in Chennai | SEO Training in Chennai

sunitha vishnu said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

seo Company in noida sector 10 said...

Best Seo company in delhi nc

srinivasulu said...

Thanks for sharing about digital marketing,your blog always brought some useful information,i hope you will share more article like that...
digital marketing classes in chennai

Bisla Bumrah said...

Thanks for giving great information about Digital marketing. Website Development Company NYC
Website Design Company NYC

Sharma Ji said...

Online certification courses in india
I extremely cherished perusing your blog. I likewise discovered your posts extremely intriguing. Actually in the wake of understanding, I needed to go demonstrate it to my companion and he ejoyed it also!

Abhishek Yadav said...

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post
Online MBA

Himanshu Veerwal said...

online colleges in India
Extremely wonderful blog. Your blog is extremely valuable for me. A debt of gratitude is in order for sharing this enlightening web journal. Keep refresh your blog

Anonymous said...

https://stitchclothes.com here we stitch clothes as per your design and selection

Kavita Singh said...

what a wonderful idea is this, to buy pets online visit us on dogs for sale near me. Thank you.

Kavya said...

"thank for sharing this information, we are Chicago web Design and provide
Content Writing Chicago"

mohd Sameer said...

https://stitchclothes.com here we stitch clothes as per your design and selection

mohd Sameer said...

https://stitchclothes.com here we stitch clothes as per your design and selection

vijay antony said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

Best Java Training Institute Chennai

mohd Sameer said...

https://stitchclothes.com here we stitch clothes as per your design and selection

kevingeorge said...

Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.

java training in bangalore


Careen joseph said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
Best Hadoop Training Institute In chennai

amazon-web-services-training-institute-in-chennai

priyanka said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
Best Java Training Institute in chennai

tirupathi ganesh said...

Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

Hadoop training in bangalore

pixel 3 release date said...

Wonderful post.This is nice post

Mathi said...

It's uncommonly extraordinary blog. It will upgrade my crucial to more hoisted sum. Thankful to you for sharing this splendid site.
Digital Marketing Course in Chennai | Digital Marketing Course | Digital Marketing Training in Chennai | Digital Marketing Chennai

impress bss said...

Thanking you for sharing valuable information
Digtal marketing traning institue in chennai
Web design and development traning institue in chennai
Mobile app development traning institue in chennai

Jonna Richard said...

Welcome to the Best writer Review, Here you can get the best All Assignment Help reviews sites. We strongly urge you to check our entire website once and we will assure you will find this review website very useful. Our hard work will be rewarded if students like you will appreciate our effort and spread the message about this site with your class-fellows and friends.

Post a Comment