Low-Level Testing Makes a More Effective Web Site
When you are looking to buy a car, do you look at the car from 10 feet away and say “I’ll take it”? You are probably going to take it on a test drive first. You want to know that what you are buying works the way you expect it to. The same principle applies to your e-commerce website. You are not going to look at it for a few seconds on a screen and say “Looks good, let’s launch it”. You are going to test drive, or unit test, your site to make sure it works the way you expected to also.
Unit testing and low-level testing are synonymous. The unit test is done for a single webpage and tests all the functionality of each and every field, button, link, drop-down list, text box and whatever else is on the page. Just like when you are test driving a car, you are checking to make sure the radio works, the windows work, there are 6 cup holders and the car actually starts and moves. All this is done based on the requirements or what you want and expect it to do.
Requirements and Unit Testing
Each field on the webpage should have corresponding requirements for it that dictate things like how many characters a field is, what is allowed to be entered in field and what type of field it is. You are making sure that all the fields displayed are the fields that should be there and behave the way the requirements say they should.
How do you unit test? Look at the requirements for a specific field and make sure you can meet them then exceed them. Let’s say you have a field called First Name on your Web site and the requirements state that the field is 20 characters long, alphanumeric and no special characters allowed. First, make sure that the webpage has a field called First Name. Then, enter 1 letter and click off the field. Try 10 letters, then 20 and lastly 21. At 21, you should not be able to enter a character per the requirements. If you can, there is a problem with the webpage and a defect needs to be entered to be resolved. Now try to enter an asterisk and see if that is allowed or not. Per the requirements, it is not allowed so if you are prevented from entering it, the test passed. This type of scrutiny is performed throughout your website.
Once is Not Enough
One low-level test of your website is not enough. Defects have probably been found, reported and are now fixed. The same unit test needs to be performed on that web page again to ensure that the bug was resolved and nothing else was affected. This process can be repeated multiple times until you are satisfied that all the bugs are fixed or the bugs remaining to be fixed are not a priority to launch your website and can be fixed at a later time.
Save Money
Another reason you should perform low-level testing is that finding the problems at this point is easier and cheaper to fix than finding them later. The cost of fixing a bug grows exponentially if it is not found in the unit test. Also, testing at an individual level eases the frustration when you test things as a whole.
About the Author:
Jen Mercer is a Quality Assurance Engineer with Network Solutions