The “doit” Tutorial & Reference Manual

 

John R. Callahan, Ph.D.


 1. Overview

The DOIT tool and Script Programming Language (SPL) is a simple scripting language for writing tests that simulate requesting and filling-in web forms without having to manually use a web browser.   It uses a console-based web client tool (like Curl or Wget) to send and receive HTTP requests and responses respectively.  SPL is implemented in Perl (using the Yapp compiler-compiler tool).  You must have Perl 5 or greater and the appropriate Perl modules installed on your system before you can use SPL.

2. Perl & Curl

You must have Perl 5 or higher installed on your UNIX or Win32 platform.  A free Perl is available at www.activestate.com for all platforms.  The following Perl modules are needed from that site (and can be installed manually or via the Perl Package Manager (ppm)) to run SPL:

 

Parser::Yapp

 

Curl is available at curl.haxx.se on the Internet for free download.  It is implemented on UNIX and all Win32 platforms.  It can communicate with HTTP and HTTPS servers as a console-based client.

 

SPL is currently packaged in the “sanity” module at the GPC CVS server.  You can checkout or export this module.  You may have to rebuild the parser itself (the SPLParser.pm file) by invoking:

 

yapp –m SPLParser –v spl.yp

 

An SPL script is invoked by executing the console command:

 

doit <scriptfile>

 

where <scriptfile> is the path to the script itself.  A collection of scripts is kept in the “scripts” subdirectory of the sanity module.  See the QA lead to reserve a range of script numbers for yourself.  Be careful because certain ranges are preassigned to other developers and testers.

3. A Simple Example

TBD

4. Simple Statements

The problem is to accurately provide information to fill-in forms automatically for users of forms.

A web form is embedded within an HTML form and rendered by a browser.  Multiple forms can be.

4.1 Append

4.2 Generate

5. An Advanced Example

This section contains a listing of the database tables used to implement the above solution.

6. Advanced Statements

This section contains a listing of the database tables used to implement the above solution.

7. SPL Grammar

The following is the LALR grammar for SPL:

 

Here is the list of SPL reserved words

 

8. Bugs