How to Test a Web Page
Phillip Harrington
Jul, 2001
Introduction
This document will guide you through the process of testing a web page for errors.
Step 1: Load the Web Page
In your local web browser go to the URL for the web page either by typing it to your browser's address field, clicking a link to the page, or filling out a form that points to the page as it's handler action. Did the page load properly?
- If you got a "Server Could Not be Found" error then DNS for that server is not working properly. Check with your Host to see that DNS is configured on their Name Servers for your domain. Also check your domain with your Registrar to make sure it is pointing to the appropriate name servers. If the domain has only been recently set up, wait a day or two and try again. If your site has an IP address (many do not), you will be able to proceed with testing by using the IP address of your page (if it was set up properly to handle multiple server name environments)
- If you got a "Server Not Responding" error then good! That means DNS is working. The bad news is that either your web server computer or your web server software is down or not functioning properly. Try to ping your machine by it's IP address. If you can, then your web server computer is functioning and your web server software is not. Check with your Host to resolve whatever issues might be present with the computer or software.
- If you got a "Server Error" message then good! DNS and your web server computer/software are working properly. You will usually encounter "Server Error" messages if the page you are trying to browse is the result of a CGI or API program being executed. Certain programming environments such as ColdFusion give you details as to the type of error that occurred. Make a copy of this information and e-mail it to your developer so they can correct the error immediately. Also include as much additional information as possible about your session, such as the browser you were using, operating system you were using, whether or not you had cookies turned on, weather or not you were behind a proxy, how you got to the page (by typing in the URL, clicking a link, or filling out a form), etc.
- If you got a "File Not Found" message, then the URL you are typing, clicking to, or posting a form to is bad. If you are coming from a page on the same site, then note the page you are coming from as having a bad link on it. Forward this information to your developer.
- If the page starts to load, but never finishes loading (meaning, the page never loads all the images, or only the top shows up, or your Netscape or IE icons that move when you're going to a page never stop moving, etc.) make a note of this. Try to reload/refresh the page and see if it was a network fluke. If the stall is consistent, note where the page stalls out and include this information. As above, try to include as much additional information as possible about your session.
If the page loaded properly, continue on to Step 2.
Step 2: Check For Broken Links
Scan the page for images and links. Are there any broken images or links?
- If there are "broken image" icons (either a picture broken in half, or an X'ed out circle), make a note of it. If possible, select the properties or source of the image and determine the intended URL of the image. Note this for your developer.
- If you come across links on the page, click them and repeat Step 1, returning to this page to complete the process before moving on to that page.
- Is the page meant to have a style sheet that is not apparent? If possible, try to view the source of the document to determine the intended URL of the style sheet. Note this for your developer.
Step 3: Submit Any Forms
If the page you are viewing has a form to fill in or you notice the presence of a "Submit" button, then there's a form on that page. Can you submit the form without an error?
- If the form has input fields, try first to submit the form with all the fields blank. A decent developer will expect this and return a polite message. If it is possible to submit the form blank, make a note of this for your developer.
- If the form has input fields that you think might expect a certain format such as date or e-mail address, try filling in something that is formatted incorrectly and submit the form. A decent developer will expect this and return a polite message. If it is possible to submit the form with incorrectly formatted fields, make a note of this for your developer.
- If the form is part of a multi-step process, try these methods on each step. This may take some knowledge about how the site works and maintains session state. The idea is to simulate all possible branches of the process. For example, fill in form 1, then leave form 2 blank. After you have cleared out any session variables or cookies that may have been set between form 1 and form 2, then try again. On the second pass, try something different like fill in form 1, then use improper format on form 2, and so on. Note what forms you filled in and how you filled them in so that you can accurately describe errors to your developer.
- Try to fill in the form correctly, without blank fields, and proper formatting of specified fields. Make sure that you don't get any error messages when you do and that the response to a properly filled in form was returned. Note any errors for your developer.
- If the form does not have any fields, but only a submit button (or more than one submit button), click the button or buttons. If you get an error clicking any one of the buttons, note this for your developer.
Step 4: Check for Logical Errors
A logical error is hard to catch, but very important. Say for example you're using an application that maintains your shopping list. If you have twenty-three items on your list and there is text on the page saying "24 items in your list", then this would be considered a logical error. This is a simple example, but the point is that logical errors are not the same as what is considered a "hard" error (one that sends a nasty error message back to your browser). Logical Errors are harder to spot, harder to describe, and harder to get your developer to own up to. Take screen-shots, explain your environment, how you got to the page, anything else you think might help the developer pinpoint the error and fix it for you.
Step 5: Check for Spelling Errors
This sounds obvious, but many people over look spell checking, especially web programmers! If you're a great speller, read the page looking for spelling errors. If you're not, copy the text of the page and drop it into your favorite word processing program and run spell check.
Rinse and Repeat
Repeat this process for each page on your web site. Other things to look for are:
- Polite error messages. "We're sorry, but an error has occurred" is much better than,"Error 12508 ODBC Improper Parameters -5680A Method Not Implemented - you get the idea - Insert scary error here".
- Some way to contact the owner or the web site if you encounter an error.
- Helpful text explaining how to recover from an error.