O'Reilly logo

Practical Internet Groupware by Jon Udell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Kit for Chapter 14

Quality Assurance Monitoring

The test harness script (http://udell.roninhouse.com/examples/TestHarness.txt) relies on these CPAN modules:

DBI

The generic database driver

DBD

A driver for a specific datasource (e.g., DBD::ODBC )

LWP

For web-client capability

By default, test-harness is set up to exercise the authorization script (auth.asp) from Chapter 12. Its configuration is governed by a hashtable that looks like this:

%sequence =  
  (  
  '000' => 
    { 
    'Description'  =>  'No-header request fails access to docbase record', 
    'Request'      =>  'http://localhost/cgi/auth.asp?doc=1998-10-19-000001', 
    'HeaderNames'  =>  [], 
    'HeaderValues' =>  [], 
    }, 
  ... 
  '003' => 
    { 
    'Description'  =>  'Valid basic-auth user fails feed registration', 
    'Request'      =>  'http://localhost/cgi/auth.asp?doc=1998-10-19-000001', 
    'HeaderNames'  =>  ['Authorization'], 
    'HeaderValues' =>  ['Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='], 
    'Constructor'  => 'unRegisterAladdinForNetscape', 
    'Destructor'   => 'reRegisterAladdinForNetscape', 
    },

To configure test-harness for some other web application, rewrite this hashtable. You might prefer to swap in your own stuff, since the authorizing docbase viewer used here is a bit complex to set up. Specify one or more requests, optionally with HTTP headers and optionally with the names of Constructor and Destructor routines that prepare the environment for a test and clean up after it.

To gather baseline data, run test-harness once in baseline mode, like this:

perl test-harness baseline

Then run it in test mode, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required