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 @ 1297:0a574315af3e

History | View | Annotate | Download (2.15 KB)

1
Installing gems for testing
2
===========================
3

    
4
Remove your .bundle/config if you've already installed Redmine without
5
the test dependencies. Then, run `bundle install`.
6

    
7
Running Tests
8
=============
9

    
10
Run `rake --tasks test` to see available tests.
11
Run `rake test` to run the entire test suite (except the tests for the
12
Apache perl module Redmine.pm, see below).
13

    
14
You can run `ruby test/unit/issue_test.rb` for running a single test case.
15

    
16
Before running tests, you need to configure both development
17
and test databases.
18

    
19
Creating test repositories
20
==========================
21

    
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
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

    
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
into a testing LDAP server. Make sure that the LDAP server can be accessed
38
at 127.0.0.1 on port 389.
39

    
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
42
good as a test server.
43

    
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.