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