]> git.koha-community.org Git - koha.git/commit
Bug 8300: Add mechanized unit test for batch import
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 23 Jun 2012 20:55:43 +0000 (16:55 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 1 May 2013 11:57:11 +0000 (07:57 -0400)
commitbc2ab3b5882e664d91ce086ce96dd32c7452dee4
tree632e485ed268cab224b779fa4f45151c90873616
parent6cbe7b645b6a458b547de8da6d82c20fa5620b6d
Bug 8300: Add mechanized unit test for batch import

This new unit test confirms that importing records via the Stage
MARC import tool still works by connecting to a Koha instance and
importing a record then reverting the import, checking at each step
of the way that everything is as it should be.

To test:
1. Install Test::WWW::Mechanize
> sudo apt-get install libtest-www-mechanize-perl
2. Set environment variables to reflect your Koha instance:
> export KOHA_USER=kohaadmin
> export KOHA_PASS=katikoan
> export KOHA_INTRANET_URL=http://localhost:8080
> export KOHA_OPAC_URL=http://localhost
3. Run the test:
> prove t/db_dependent/www/batch.t

This updated patch now handles both MARC21 and UNIMARC installations.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
All tests pass with marcflavour = MARC21 and NORMARC. Test #15 fails
when marcflavour = UNIMARC, but from what I can see, that is because
I'm testing on a MARC21 setup, missing the UNIMARC frameworks etc.
I'm signing off - QA folks, please ask for a proper UNIMARC signoff
if you feel it is needed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Load the POSIX module (for the floor routine).
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
t/db_dependent/www/batch.t [new file with mode: 0644]
t/db_dependent/www/data/marc21record.mrc [new file with mode: 0644]
t/db_dependent/www/data/unimarcrecord.mrc [new file with mode: 0644]