Developer Documentation


Swete is written in Eiffel, a pure object oriented language that features design by contract, strict typing, multiple inheritance, true generiticity, and a simple easy to read syntax. All existing Eiffel compilers generate C code which is subsequently compiled yielding fast performance and portability. The best Eiffel reference is Object Oriented Software Construction The compiler used by the project is produced by Eiffel Software Incorporated. An open source compiler, Smart Eiffel, is also available. Please note that although this project uses libraries that are compatible with Smart Eiffel, it hasn't to date been compiled on it and may not compile cleanly out of the box. The GOBO project recommands using Smart Eiffel version 1.0 (not the current version), which at that time was actually called Small Eiffel.

This project depends on libraries provided by the GOBO project, EPOSIX, and ECLOP.

Installing the Source Code

  1. Install a GOBO supported compiler, GOBO 3.3, EPOSIX 2.0, and ECLOP (unofficial-release), taking care to set all of the required of the required environment variables. Set ECLOP=eclop where eclop is the directory containing the library.xace file.
  2. Obtain the swete source code from CVS.
  3. Switch to the swete/proxy directory and type:
    geant compile
    geant compile_debug (that's compile_debug) to enable assertions
  4. Switch to the swete/test directory and type:
    geant compile
    geant compile_debug (that's compile_debug) to enable assertions
  5. Move the compiled binaries (test/swete_test and proxy/swete_proxy) to a directory in the execution path (optional).

Note: To date, compilation has been tested only on RedHat EL WS using the ESI 5.4 compiler.

Overview of swete_proxy


  1. Accepts http requests from the user's web browser,
  2. Forwards them to the web server,
  3. Relays the response back to the user,
  4. Records the request and response headers in an XML script ( click here for the schema of the recorded XML file), and
  5. Stores each text/html response in an external file with the XML script.

The class SERVER_COMMUNICATION provides facilities for sending requests to a web server and processing the response. A BON diagram of swete_proxy is available here. Click here for more information on Business Object Notation. The class SWETE_SCRIPT_CALLBACKS in the diagram is present to support the --continue option and is described in the swete_test section below.

Overview of swete_test

The class SWETE_SCRIPT_CALLBACKS processes events generated by class XM_EIFFEL_PARSER while parsing a swete_script.xml file. When a complete <request></request> element for a text/html request has been parsed, it is sent to the server and the response is compared to the file given by the <response_content file_name="file_name.htm"> element after correcting for any expected differences.

The class HTML_SCANNER (the link is to the scanner description file which is run though gelex to generate the actual class) is used to find the names/values of any hidden inputs in html files to support the --replace option. The replacement cluster is used to correct expected differences between the response obtained from the server during script playback and the expected response recorded in the script directory.

A BON diagram of swete_test is available here.

Additional Information

Introduction to swete

Installation and Usage

Source Forge Project Page (for downloads, support, feature requests, mailing lists, cvs access, etc.) Logo

Support This Project