improvements to automated tests, including a testing database
authorAndrew Moore <andrew.moore@liblime.com>
Fri, 18 Apr 2008 15:58:30 +0000 (10:58 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 21 Apr 2008 16:26:27 +0000 (11:26 -0500)
commit80568463eac45ede97268c02ee7d59028cb3ff9b
treedf56261c52b5f286781e3ea27883b83251229d41
parentecc779fa506ce99612f5184718fe94e937762bf1
improvements to automated tests, including a testing database

I'm adding a bunch of additions to the test suite. There is now a test
database that is created, and a test instance of the zebra server and
daemon that are run before the tests in t/database-dependent.pl are
run. This means that you can test things that insert (or destroy)
things in the database.

To use these tests, after you 'make' your koha installation, you can
change to the 't' directory and 'make test' there.

There is now an additional question asked during installation. It asks
whether you would like to run the data-dependent tests. If so, It asks
you for some login information to a test database. I recommend that
you do not not use your production database here. It will delete all
of the data in it.

Things that need improvement:
* I suspect that there are large parts that are not very platform
  independent, so they will need to be improved.
* There are some parts of the installer that will probably be
  refactored to let this work a little bit better, including being run
  directly from a main-level 'make' target at some point.
* Lots more tests to add. Be bold! (see the t/lib directory)
* other tests in t/*.t can possibly benefit from being included in here.

There are two required perl modules for this part of the test suite. I
use:
'Test::Class' => 0.028,
'Test::Class::Load' => 0.02,
They are not listed as requirements in the top-level Makefile.PL
because they're not actually required to install or use Koha, but if
you want to run the test suite, you can install them from CPAN.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Makefile.PL
t/Makefile [new file with mode: 0644]
t/database_dependent.pl [new file with mode: 0644]
t/rewrite-config-test.PL [new file with mode: 0644]