The nearly instant worldwide audience makes a WebSite's quality and reliability crucial to its success. The nature of the WWW and of WebSite software pose unique software testing challenges. Webmasters, WWW applications developers, and WebSite quality assurance managers need tools and methods that meet very specific needs. Our technical approach, based on extending existing WWW browsers, offers many attractive benefits in meeting these needs.
Within minutes of going live, a WWW application can have many thousands more users than a conventional, non-WWW application. The immediacy of a WebSite creates immediate expectations of quality, but the technical complexities of a WebSite and variances in the available browsers make testing and quality control that much more difficult, than "conventional" client/server or application testing. Automated testing of WebSites thus is both an opportunity and a significant challenge.
Like any complex piece of software there is no single quality measure to fully characterize a WebSite.
There are many dimensions of quality, and each measure will pertain to a particular WebSite in varying degrees. Here are some of them:
Clearly, “Quality” is in the mind of the WebSite user. A poor-quality WebSite, one with many broken pages and faulty images, with Cgi-Bin error messages, etc. may cost in poor customer relations, lost corporate image, and even in lost sales revenue. Very complex WebSites can sometimes overload the user.
A WebSite can be quite complex, and that complexity can be a real impediment in assuring WebSite Quality.
What makes a WebSite complex? These are the issues test systems have to contend with:
Assuring WebSite quality automatically requires conducting sets of tests, automatically and repeatably, that demonstrate required properties and behaviors. Here are some required elements of tools that aim to do this.
Tests need to operate from the browser level for two reasons: (1) this is where users see a WebSite, so tests based in browser operation are the most realistic; and (2) tests based in browsers can be run locally or across the Web equally well. Local execution is fine for quality control, but not for performance measurement work, where response time including Web-variable delays reflective of real-world usage is essential.
Confirming validity of what is tested is the key to assuring WebSite quality the most difficult challenge of all. Here are four key areas where test automation will have a significant impact.
Considering all of these disparate requirements, it seems evident that a single product that supports all of these goals will not be possible. However, there is one common theme: the majority of the work seems to be based on "...what does it [the WebSite] look like from the point of view of the user?" That is, from the point of view of someone using a browser to look at the WebSite.
This observation led our group to conclude that it would be worthwhile trying to build certain test features into a "test enabled web browser", which we called CAPBAK/Web in the expectation that this approach would let us do the majority of the WebSite quality control functions using that engine as a base.
Browser Based Solution - With this as a starting point, we determined that the browser based solution had to meet these additional requirements:
Some Browser Features Must Be Deletable. At the same time, certain requirements imposed limitations on what was to be built. For example, if we were going to have accurate timing data we had to be able to disable caching because otherwise we are measuring response times within the client machine rather than "across the web."
Extensibility Assured. To permit meaningful experiments, the product had to be extensible enough to permit timings, static analysis, and other information to be extracted.
Taking these requirements into account, and after investigation of W3C's Amaya Browser and the open-architecture Mozilla/Netscape Browser we chose the IE Browser as our initial base for our implementation of CAPBAK/Web.
User Interface - How the user interacts with the product is very important, in part because in some cases the user will be someone very familiar with WebSite browsing and not necessarily a testing expert. The design we implemented takes this reality into account.
"C" Scripting. We use interpreted "C" language as the control language because the syntax is well known, the language is fully expressive of most of the needed logic, and because it interfaces well with other products.
Files Interface. We implemented a set of dialogs to capture critical information and made each of them recordable in a text file. The dialogs are associated with files that are kept in parallel with each browser invocation:
Keysave File: This is the file that is being created the file is shown line by line during script recording as the user moves around the candidate WebSite.
Timing File: Results of timings are shown and saved in this file.
Messages File: Any error messages encountered are delivered to this file. For example, if a file can't be downloaded within the user-specified maximum time an error message is issued and the playback continues. (This helps preserve the utility of tests that are partially unsuccessful.)
Event File: This file contains a complete log of recording and playback activities that are useful primarily to debug a test recording session or to better understand what actually went on during playback.
Operational Features.Based on prior experience, the user interface for CAPBAK/Web had to provide for several kinds of capabilities already known to be critical for a testing system. Many of these are critically important for automated testing because they assure an optimal combination of test script reliability and robustness.
Figure 1. Illustration of CAPBAK/Web Validate Selected Text Feature.
Test Wizards - In most cases manual scripting is too laborious to use and making a recording to achieve a certain result is equally unacceptable. We built in several test wizards that mechanize some of the most common script-writing chores.
Here is a sample of the output of this wizard, applied to our standard test page:
void name() { /* Produced by CAPBAK/Web [IE] Ver. 1.5 Form Wizard */ /* (c) Copyright 1999 by Software Research, Inc. */ WT_InitLink("http://www.testworks.com/Products/Web/CAPBAK/example1/"); WT_SubmitForm(FORM:0:12, "RESET FORM"); WT_SelectOneRadio(FORM:0:0, "now", "TRUE"); WT_SelectOneRadio(FORM:0:1, "next", "TRUE"); WT_SelectOneRadio(FORM:0:2, "look", "TRUE"); WT_SelectOneRadio(FORM:0:3, "no", "TRUE"); WT_SelectCheckBox(FORM:0:4, "concerned", "TRUE"); WT_SelectCheckBox(FORM:0:5, "info", "TRUE"); WT_SelectCheckBox(FORM:0:6, "evaluate", "TRUE"); WT_SelectCheckBox(FORM:0:7, "send", "TRUE"); WT_FormTextInput(FORM:0:8, "TestWorks"); WT_FormTextInput(FORM:0:9, "TestWorks"); WT_FormTextInput(FORM:0:10, "TestWorks"); WT_FormTextInput(FORM:0:11, "TestWorks"); WT_SubmitForm(FORM:0:13, "SUBMIT FORM"); } |
The idea is that this script can be processed automatically to produce the result of varying combinations of pushing buttons. As is clear, the wizard will have pushed all buttons, but only the last-applied one in a set of radio buttons will be left in the TRUE state.
Early applications of the CAPBAK/Web system have been very effective in producing experiments and collecting data that is very useful for WebSite checking. While we expect CAPBAK/Web to be the main engine for a range of WebSite quality control and testing activities, we've chosen two of the most typical and most important applications to illustrate how CAPBAK/Web can be used.
E-Commerce Illustration - This example shows a typical E-Commerce product ordering situation. The script automatically places an order and uses the Validate Selected Text sequence to confirm that the order was processed correctly. In a real-world example this is the equivalent of (i) selecting an item for the shopping basket, (ii) ordering it, and (iii) examining the confirmation page's order code to assure that the transaction was successful. (The final validation step of confirming that the ordered item was actually delivered to a specific address is not part of what CAPBAK/Web can do.)
void name() { /* Recording by CAPBAK/Web [IE] Ver. 1.5 (c) Copyright 1999 by Software Research, Inc. */ WT_InitLink("http://www.soft.com/Products/Web/CAPBAK/example1/example1broken.html"); WT_SelectOneRadio(FORM:1:0, "buying-now", "TRUE"); WT_SelectOneRadio(FORM:1:1, "next-month", "FALSE"); WT_SelectOneRadio(FORM:1:2, "just-looking", "FALSE"); WT_SelectOneRadio(FORM:1:3, "no-interest", "FALSE"); WT_SelectOneRadio(FORM:1:4, "Yes", "TRUE"); WT_SelectOneRadio(FORM:1:5, "Yes", "TRUE"); WT_SelectOneRadio(FORM:1:6, "Yes", "TRUE"); WT_SelectOneRadio(FORM:1:7, "Yes", "TRUE"); WT_FormTextInput(FORM:1:8, "Mr. Software"); WT_FormTextInput(FORM:1:9, "415-550-3020"); WT_FormTextInput(FORM:1:10, "[email protected]"); WT_FormTextInput(FORM:1:11, "8889999"); WT_SubmitForm(FORM:1:13, "SUBMIT FORM"); WT_Wait(3425); WT_ValidateText(12, 143, "88899999"); } |
All of these needs and requirements impose constraints on the test automation tools used to confirm the quality and reliability of a WebSite. The CAPBAK/Web approach offers some significant benefits and technical advantages when dealing with complicated WebSites. Better, more reliable WebSites should be the result.
A more complete version of this paper can be found at WebSite Testing
You can learn more about the CAPBAK/WEB system by taking a Tour of CAPBAK.
There is a detailed description of the P4 Family of CAPBAK/Web Examples.
About the Author |
Author Contact Information |
Dr. Edward Miller is Chairman of Software Research, Inc., San Francisco, California, where he has been involved with software test tools development and software engineering quality questions. Dr. Miller has worked in the software quality management field for 25 years in a variety of capacities, and has been involved in the development of families of automated software and analysis support tools. He was chairman of the 1985 1st International Conference on Computer Workstations, and has participated in IEEE conference organizing activities for many years. He is the author of Software Testing and Validation Techniques, an IEEE Computer Society Press tutorial text. Dr. Miller received a Ph.D. (Electrical Engineering) degree from the University of Maryland, an M.S. (Applied Mathematics) degree from the University of Colorado, and a BSEE from Iowa State University. |
Dr. Edward Miller |
![]() |
![]() |
![]() |