@@ -1,57 +1,60 | |||
|
1 | 1 | Installing gems for testing |
|
2 | 2 | =========================== |
|
3 | 3 | |
|
4 | 4 | Remove your .bundle/config if you've already installed Redmine without |
|
5 | 5 | the test dependencies. Then, run `bundle install`. |
|
6 | 6 | |
|
7 | 7 | Running Tests |
|
8 | 8 | ============= |
|
9 | 9 | |
|
10 | 10 | Run `rake --tasks test` to see available tests. |
|
11 | 11 | Run `rake test` to run the entire test suite (except the tests for the |
|
12 | 12 | Apache perl module Redmine.pm, see below). |
|
13 | 13 | |
|
14 | 14 | You can run `ruby test/unit/issue_test.rb` for running a single test case. |
|
15 | 15 | |
|
16 | 16 | Before running tests, you need to configure both development |
|
17 | 17 | and test databases. |
|
18 | 18 | |
|
19 | 19 | Creating test repositories |
|
20 | 20 | ========================== |
|
21 | 21 | |
|
22 | 22 | Redmine supports a wide array of different version control systems. |
|
23 | 23 | To test the support, a test repository needs to be created for each of those. |
|
24 | 24 | |
|
25 | 25 | Run `rake --tasks test:scm:setup` for a list of available test-repositories or |
|
26 | 26 | run `rake test:scm:setup:all` to set up all of them. The repositories are |
|
27 | 27 | unpacked into {redmine_root}/tmp/test. |
|
28 | 28 | |
|
29 | 29 | If the test repositories are not present, the tests that need them will be |
|
30 | 30 | skipped. |
|
31 | 31 | |
|
32 | 32 | Creating a test ldap database |
|
33 | 33 | ============================= |
|
34 | 34 | |
|
35 | 35 | Redmine supports using LDAP for user authentications. To test LDAP |
|
36 | 36 | with Redmine, load the LDAP export from test/fixtures/ldap/test-ldap.ldif |
|
37 | 37 | into a testing LDAP server. Make sure that the LDAP server can be accessed |
|
38 | 38 | at 127.0.0.1 on port 389. |
|
39 | 39 | |
|
40 | 40 | Setting up the test LDAP server is beyond the scope of this documentation. |
|
41 | 41 | The OpenLDAP project provides a simple LDAP implementation that should work |
|
42 | 42 | good as a test server. |
|
43 | 43 | |
|
44 | 44 | If the LDAP is not available, the tests that need it will be skipped. |
|
45 | 45 | |
|
46 | 46 | Running Redmine.pm tests |
|
47 | 47 | ======================== |
|
48 | 48 | |
|
49 | 49 | (work in progress) |
|
50 | 50 | |
|
51 | 51 | Running the tests for the Redmine.pm perl module needs a bit more setup. |
|
52 | 52 | You need an Apache server with mod_perl, mod_dav_svn and Redmine.pm configured. |
|
53 | 53 | See: http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl |
|
54 | 54 | |
|
55 | 55 | You need an empty repository accessible at http://127.0.0.1/svn/ecookbook |
|
56 | 56 | Then, you can run the tests with: |
|
57 | 57 | `ruby test\extra\redmine_pm\repository_subversion_test.rb` |
|
58 | ||
|
59 | If you svn server is not running on localhost, you can use the REDMINE_TEST_DAV_SERVER | |
|
60 | environment variable to specify another host. |
General Comments 0
You need to be logged in to leave comments.
Login now