TESTS README
============

Introduction
------------

After the catastrophic release of 1.9.11 (featuring a new (and broken) indexing
mechanism) I started to think about a better way to test database features than
just playing in the GUI, trying to cover every cases.

My first idea was to use DejaGnu [1] but doing so was also adding dependency on
both DejaGnu and Expect packages and I considered that a bad idea (as well as
thinking that DejaGnu might be overkill for such a little app (little for the
database part, I'm not talking about GUI here)).

So I decided to do it myself and wrote a little Python script to run several
tests written in C and comparing the output with the expected output (using
diff).

Current tests
-------------

There are currently 29 tests for:
 - adding records
 - removing some random records
 - removing every records (3 versions to deal with different orders)
 - indexing records (6 tests for different field types)
 - reversed-indexing records (idem)
 - misc mixed operations (2 tests)
 - conditions (9 tests)
 - basic cursor manipulation

They are good tests for basic operations but they only test those (basic
operations) and many other functions are left out not tested at all!

Usage
-----

AFTER compiling Gaby the usual way (read the INSTALL file) type 'make check'
(you might want to be in this directory first if you don't want make to iterate
over each subdirectories). It will print the results.

Last note
---------

Having succesful tests doesn't mean Gaby is perfect for the simple reason
that only database functions are tested while you will spend most of your time
in the GUI where a test suite is _much_ harder to write.

Nevertheless I hope there aren't too many bugs in the GUI and urge you to send
me bug reports for any problem you might find.

-- 
Frederic Peters - Thu, 28 Dec 2000 14:41:24 +0100

[1] available on: ftp://prep.ai.mit.edu:/pub/gnu/dejagnu-1.3.tar.gz

