Introduction ------------ RbTET is a Ruby implementation of the TET API. The implementation has been done using the interface compiler SWIG (http://www.swig.org). RbTET was developed on a RedHat 9.0 Linux using TETware release 3.7, but there is no reason it shouldn't work on any POSIX conforming platform that supports Ruby and one of TET 3.3, TET3.6 or TETware 3.7. Building -------- It is assumed you have first installed and successfully built one of the TET versions mentioned above. You should have an environment with TET_ROOT set and a PATH with $TET_ROOT/bin and the location to the Ruby interpreter. You can edit and source in the provided rbtet_profile. RUBYPATH must contain the directory where the RbTET module Rbtet.rb is located. RUBYLIB must contain the directory where the shared library rbtet_ext.so is located. You will need to edit the Makefile and check the settings for the target system. You can then run the make command to build the shared library. If you want to re-run SWIG you will need to have SWIG 1.3.21 or later installed on the system. You can then compile using Makefile.swig after checking the contents. Running the demo ---------------- A RbTET demo is supplied under rbtet_demo. This contains a tet_scen with three sample test sets; tc1, tc1 and tc3. Have a look at the contents of each test set. This will give you an idea of how to make calls to the TET API through Ruby. The main points to remember is to first include the Rbtet module in the test code using the "load" or "require" statements. You will then need to define the TestSet class, this can be named accordingly, but it must extend the super class Rbtet::SuperTestSet. The test list is defined as a class variable @@testlist and initialised with a Hash object containing the keyed pairs of test number/test name. Then the optional startup and cleanup methods are defined followed by the list of test methods. To register the all the Ruby methods and start running the tests you will finally need to call Rbtet.rbtet_init(). This method takes 3 arguments; the TestSet instance, and optionally the names of the startup and cleanup methods. If the startup and cleanup methods are not provided, then just pass the value Rbtet::TET_NULLFP. Assuming the rbtet_demo is installed under $TET_ROOT, then change to the $TET_ROOT/rbtet_demo directory and run the command: tcc -p -e Otherwise set TET_SUITE_ROOT to where the rbdemo directory is. This will run the tests and put the journal in the results directory. Hopefully this is enough to get you started! Regards, Neil Moses, The Open Group, 8th March 2005.