You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RUNNING_TESTS 2.4KB

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