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

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