Next: , Previous: Getting Started, Up: Tutorial


2.2 Running the Tests

There are three files in the directory tests that make running the automated tests particularly easy. BerkeleyDB-tests.lisp is for running against the BerkeleyDB backend, and SQLDB-tests.lisp is for running agains the CL-SQL backend. MigrationTests.lisp is for testing data migration functions, and can be used with either or both backends.

The normal way to execute the tests, following the instruction in the file INSTALL, is to open a listener and execute the lines found in one of these files, such as:

     (asdf:operate 'asdf:load-op :elephant-tests)
     
     (in-package "ELEPHANT-TESTS")
     
     (setf *default-spec* *testbdb-spec*)
     
     (do-backend-tests)

The SQL test file differs only in using a different “controller spec”: *default-spec* *testpg-spec*) These default parameters are set in tests/elephant-tests.lisp, they will looks something like this in a default distribution:

     (:BDB "/home/read/projects/sql-back-end/elephant/tests/testdb/")

and for postgres:

     (:CLSQL (:POSTGRESQL "localhost.localdomain" "test" "postgres" ""))