To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / doc / RUNNING_TESTS @ 1298:4f746d8966dd

History | View | Annotate | Download (2.35 KB)

1 0:513646585e45 Chris
Installing gems for testing
2
===========================
3
4 1115:433d4f72a19b Chris
Remove your .bundle/config if you've already installed Redmine without
5
the test dependencies. Then, run `bundle install`.
6 0:513646585e45 Chris
7
Running Tests
8
=============
9
10
Run `rake --tasks test` to see available tests.
11 1115:433d4f72a19b Chris
Run `rake test` to run the entire test suite (except the tests for the
12 1295:622f24f53b42 Chris
Apache perl module Redmine.pm and Capybara tests, see below).
13 1115:433d4f72a19b Chris
14
You can run `ruby test/unit/issue_test.rb` for running a single test case.
15 0:513646585e45 Chris
16 909:cbb26bc654de Chris
Before running tests, you need to configure both development
17 0:513646585e45 Chris
and test databases.
18
19
Creating test repositories
20 1115:433d4f72a19b Chris
==========================
21 0:513646585e45 Chris
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.
24
25
Run `rake --tasks test:scm:setup` for a list of available test-repositories or
26 1115:433d4f72a19b Chris
run `rake test:scm:setup:all` to set up all of them. The repositories are
27
unpacked into {redmine_root}/tmp/test.
28
29
If the test repositories are not present, the tests that need them will be
30
skipped.
31 0:513646585e45 Chris
32
Creating a test ldap database
33
=============================
34
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
37 1115:433d4f72a19b Chris
into a testing LDAP server. Make sure that the LDAP server can be accessed
38 0:513646585e45 Chris
at 127.0.0.1 on port 389.
39
40 1115:433d4f72a19b Chris
Setting up the test LDAP server is beyond the scope of this documentation.
41 0:513646585e45 Chris
The OpenLDAP project provides a simple LDAP implementation that should work
42
good as a test server.
43 1115:433d4f72a19b Chris
44
If the LDAP is not available, the tests that need it will be skipped.
45
46
Running Redmine.pm tests
47
========================
48
49
(work in progress)
50
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.
53
See: http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl
54
55
You need an empty repository accessible at http://127.0.0.1/svn/ecookbook
56
Then, you can run the tests with:
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.
61 1295:622f24f53b42 Chris
62
Running Capybara tests
63
======================
64
65
You need to have PhantomJS WebDriver listening on port 4444:
66
`phantomjs --webdriver 4444`
67
68
Capybara tests can be run with:
69
`rake test:ui`