RUNNING_TESTS
57 lines
| 2.0 KiB
| text/plain
|
TextLexer
/ doc / RUNNING_TESTS
|
r2811 | Installing gems for testing | ||
=========================== | ||||
|
r8784 | Remove your .bundle/config if you've already installed Redmine without | ||
|
r9642 | the test dependencies. Then, run `bundle install`. | ||
|
r2811 | |||
|
r1222 | Running Tests | ||
============= | ||||
|
r2258 | Run `rake --tasks test` to see available tests. | ||
|
r9643 | Run `rake test` to run the entire test suite (except the tests for the | ||
Apache perl module Redmine.pm, see below). | ||||
|
r9642 | |||
You can run `ruby test/unit/issue_test.rb` for running a single test case. | ||||
|
r1222 | |||
|
r6940 | Before running tests, you need to configure both development | ||
|
r2907 | and test databases. | ||
|
r1222 | |||
|
r2258 | Creating test repositories | ||
|
r9642 | ========================== | ||
|
r2258 | |||
Redmine supports a wide array of different version control systems. | ||||
To test the support, a test repository needs to be created for each of those. | ||||
|
r1222 | |||
|
r2258 | Run `rake --tasks test:scm:setup` for a list of available test-repositories or | ||
|
r9642 | run `rake test:scm:setup:all` to set up all of them. The repositories are | ||
unpacked into {redmine_root}/tmp/test. | ||||
If the test repositories are not present, the tests that need them will be | ||||
skipped. | ||||
|
r1918 | |||
|
r3324 | Creating a test ldap database | ||
============================= | ||||
Redmine supports using LDAP for user authentications. To test LDAP | ||||
with Redmine, load the LDAP export from test/fixtures/ldap/test-ldap.ldif | ||||
|
r9642 | into a testing LDAP server. Make sure that the LDAP server can be accessed | ||
|
r3324 | at 127.0.0.1 on port 389. | ||
|
r9642 | Setting up the test LDAP server is beyond the scope of this documentation. | ||
|
r3324 | The OpenLDAP project provides a simple LDAP implementation that should work | ||
good as a test server. | ||||
|
r9642 | |||
If the LDAP is not available, the tests that need it will be skipped. | ||||
|
r9643 | |||
Running Redmine.pm tests | ||||
======================== | ||||
(work in progress) | ||||
Running the tests for the Redmine.pm perl module needs a bit more setup. | ||||
You need an Apache server with mod_perl, mod_dav_svn and Redmine.pm configured. | ||||
See: http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl | ||||
You need an empty repository accessible at http://127.0.0.1/svn/ecookbook | ||||
Then, you can run the tests with: | ||||
`ruby test\extra\redmine_pm\repository_subversion_test.rb` | ||||