Example Usage


What follows is a very simple and condensed illustration of functional test automation. Our sample application is a telephone directory lookup Web site, http://www.qwestdex.com. This is not intended as any type of endorsement; it simply provides a stable, public application with characteristics that enable us to illustrate the tests.

We have found that spreadsheets are a convenient way to define and maintain test definitions. The test definitions for the example are shown in Table 38.2.

These are the actual definitions of the tests, in which the parameters and expected results are encoded in a form that can be directly interpreted by the test modules. For simplicity, all validation of expected results has been specified as checks on the presence of text strings, but the framework also supports validating the presence and attributes of links, forms, and tables.

The test modules are implemented using the WebART scripting language, and the Java framework can then be used to execute test definitions directly from the spreadsheet. The output from a test run is an HTML log file, as shown in Figure 38.1, that provides an overall pass/fail status for the test and individual outcomes on each test case.

Figure 38.1. Output from the qwmain tests

graphics/38fig01.gif

It is possible to drill down to a particular test case by clicking the link for an individual test case. Figure 38.2 shows the GotoLogin case.

Figure 38.2. Output from the GotoLogin test case

graphics/38fig02.gif

Likewise, it is possible to drill down to a particular validation, as shown in Figure 38.3.

Figure 38.3. Validation output for GotoLogin

graphics/38fig03.gif

Table 38.2. Test Definitions Maintained in the qwmain.xls Spreadsheet
Actions Parameters Expected Results
GotoLogin   VerifyText ("qwestdex.com Your Online Directory Expert", "Please enter your password")
Login <uid=globners&psw=globners&> VerifyText("Tip House ")
GotoSearch   VerifyText("Select what you're looking for")
Search <cat=Woodworking Equip&city =cleveland&state=Ohio&> VerifyText ("qwestdex.com found these businesses")
Logout   VerifyText("You have signed out ")



Extreme Programming Perspectives
Extreme Programming Perspectives
ISBN: 0201770059
EAN: 2147483647
Year: 2005
Pages: 445

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net