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