Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Unit tests
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Since Eprints 3.2 [[New_Features_in_EPrints_3.2#Unit_Tests |unit tests have been included in the codebase]] and can be run by developer and non developer alike. The tests are not changed very often, but there are quite a few of them covering the existing codebase. == Required packages== Exact requirements for running the tests aren't documented but at this writing, the used packages are these (available from a distribution package or CPAN). $ grep -h '^use.*::' * |cut -d ' ' -f 2 |sort -u "EPrints::Test" "EPrints::Test::XML" Data::Compare; Data::Dumper; Digest::MD5; EPrints::SystemSettings; EPrints::Test::RepositoryLog; EPrints::Test; LWP::UserAgent; Test::MockObject::Extends; Test::MockObject; Test::More Test::More; XML::LibXML::XPathContext; XML::LibXML; On RHEL these can be installed by: yum install eprints perl-Data-Compare perl-libwww-perl perl-Test-Simple perl-Test-MockObject perl-XML-LibXML == Optional packages == There are also optional dependencies (checked with egrep 'require .*::' *): * Test::Memory::Cycle * XML::DOM * XML::GDOME yum install perl-Test-Memory-Cycle perl-XML-DOM XML::GDOME is not available on RHEL6 repositories Storage::LocalCompress is not available on RHEL6 repositories, but if installing it PerlIO::gzip (perl-PerlIO-gzip) is required. === EPrint generating script === EPrints ships ''testdata//bin/import_rand_data'' to generate a number of records ( By default creates 1000 prints, 100 publications, 10 publishers and 10 institutions). They don't appear to be required by existing tests but you may find them useful to have during testing anyway and they will be used if available. This requires [ https://metacpan.org/pod/Text::Lorem Text::Lorem] which is not packaged but can be trivially vendored in to an eprints install. wget https://st.aticpan.org/source/ADEOLA/Text-Lorem-0.3/lib/Text/Lorem.pm -O perl_lib/Text/Lorem.pm Once installed it can be run with ./testdata/bin/import_rand_data REPOID Following this ensure your documents are indexed, either via web or command line ./bin/indexer start --verbose --notdaemon # ^C to stop this after completion == Other configuration == * A user named "admin" is required for some tests to run, said user does not have to be an admin == Dummy data == For test instances test data can be installed. Without this data set many dozen tests will fail. Pre supplied data (from testdata/* can be installed with ``import_test_data`` - REPOID is required. ./testdata/bin/import_test_data REPOID Following this ensure your documents are indexed, either via web or command line ./bin/indexer start --verbose --notdaemon # ^C to stop this after completion == Expected output == Not everything is an error - these items look like problems but aren't. # Undefined phrase: xxx_invalid (en) at line 24 in /usr/share/eprints/tests/55_phrases.pl
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)