Tip

Testing iSeries Web applications


Andrew Borts
Testing the Web sites you create involves many arts we use on an iSeries. However, people don't realize they can perform the same sort of detailed "what's happening behind the curtains?" checks not normally associated with mysterious Web pages.

First, let's decide how detailed we need to get; who is our audience? Where can we get the information we need? We can choose to collect log information inside of the iSeries when we create the Web site using tools such as WebTrends or one of the many other free utilities that are available over the Internet. Using one of those utilities enables us to know who's using our Web site.

Look in the set-up portion of the Web site for a section called "Logging" and set up every thing you need to see who's using your Web sites. (Please look for Apache Logging in the Apache documentation). Now that we have an idea who our audience is, (operating systems -- Windows users, Macintosh users, and the browsers -- Internet Explorer, Mozilla, Netscape, you'll even be able to view the resolution of their browsers) we can now focus our tests.

At this time, you'll need to have more then one browser installed on your system to test properly. However, to do extensive testing, there are online resources you can use to view your Web pages. BrowserCam is a company that has many PC's set up to check the validity and formatting of Web pages. The service sends you screen captures of the PC's using your Web site. Another method is to create a Virtual PC with many operating systems. (Coincidentally, Microsoft has a product called Virtual PC). Please keep in mind, doing these tests are very time consuming. Since you can have one copy only of Internet Explorer installed, you're stuck keeping many PC's around or using that software to set up multiple virtual partitions. My general "rule of thumb" is to go back one complete version with Internet Explorer (not counting the fact that Internet Explorer 7 is still Beta testing), Netscape, and Mozilla's Firefox. Please also understand that Internet Explorer on Mac and Internet Explorer on Windows are two software packages, not one.

OK you have the tools lined up, but where do you start? With Hypertext Markup Language (HTML), of course. HTML is the language used to display the page; it isn't complex, and browsers such as Internet Explorer are very forgiving in how you create your HTML code. Other browsers, such as Netscape, are not as forgiving. Every HTML tag needs to follow the rules set forth when the language was created (sorry). To help enforce these rules, software such as HTML Tidy can help tons. HTML Tidy inspects your HTML output (right-click "View" and select "Source.") Some versions of the software can even format your HTML to look proper.

In browsers such as Mozilla and Netscape, the HTML viewed will be colored. In Netscape any errors, such as syntax errors or out of sequence ends (for every beginning, there's an end), will blink. Another tool that insures the HTML is coded properly is HomeSite -- an HTML editor by Macromedia (now owned by Adobe). HomeSite can also check the validity of HTML documents. You can also validate the document by using its "Tools" menu.

Checking the validity of your code is very important. When generating HTML documents using iSeries tools -- such as Net.Data, WebSphere, or other CGI software packages -- the output HTML is displayed by the browsers. Their interpretation of your produced HTML will make or break how your site looks.

Mozilla has some excellent tools you can add into its browser. Shown in the example below, you'll see my Firefox (Mozilla) displayed with the added in "Developer Tools" where you can disable certain portions of your Web page to see how the page reacts and displays, look at cookies produced by your page, and many more tools that are quite useful in figuring out what is working, and what may be a potential problem.

One important thought to keep in mind is the resolutions of the screens used by your Web users. If you have a usage greater then 10% of a low resolution, then use that. Today's Web sites use the "rule of thumb" of 800 by 600 pixels to make sure the lowest resolutions used will allow a Web site to be viewed properly with minimum horizontal scrolling. The above window is an example of an 800 by 600 pixel resolution Web page. Please note that you will need to have a certain buffer, as well, since people have different tools, search products (Google, Yahoo etc.) up on the top of your browser window.

In this tip, we've learned how to find out how to log who's using our Web sites, figure out what operating systems and browsers are being used, what resolutions are being used, (all in the standard logs). We've also discussed the best way to track using a logging analysis application, how to choose the correct resolution for the overall appearance, and how to make sure what we're producing -- using our CGI programs (Net.Data, .Net, J2EE, Websphere) -- is formatted so the browsers can display it properly. My next article, I'll go into detail about the debugging of the Web page and the internal elements of the Web page -- the JavaScript.

-----------------------------------------
About the author: Andrew Borts is webmaster at United Auto Insurance Group in North Miami, Fla. He is often a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.


This was first published in March 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.