diff --git a/docs/internal/testing.md b/docs/internal/testing.md index 0fce6a0f72..5404c16d05 100644 --- a/docs/internal/testing.md +++ b/docs/internal/testing.md @@ -86,10 +86,12 @@ because the `capa` package handles problem XML. # Running Tests -Before running tests, ensure that you have all the dependencies. You can install dependencies using: +You can run all of the unit-level tests using the command - rake install_prereqs + rake test +This includes python, javascript, and documentation tests. It does not, however, +run any acceptance tests. ## Running Python Unit tests @@ -97,15 +99,15 @@ We use [nose](https://nose.readthedocs.org/en/latest/) through the [django-nose plugin](https://pypi.python.org/pypi/django-nose) to run the test suite. -You can run tests using `rake` commands. For example, +You can run all the python tests using `rake` commands. For example, - rake test + rake test:python runs all the tests. It also runs `collectstatic`, which prepares the static files used by the site (for example, compiling Coffeescript to Javascript). -You can re-run all failed python tests by running (all JS tests will still run) +You can re-run all failed python tests by running - rake test[--failed] + rake test:python[--failed] You can also run the tests without `collectstatic`, which tends to be faster: diff --git a/rakelib/tests.rake b/rakelib/tests.rake index b0c8f4979d..2815fdfb57 100644 --- a/rakelib/tests.rake +++ b/rakelib/tests.rake @@ -159,11 +159,16 @@ TEST_TASK_DIRS.each do |dir| report_dir = report_dir_path(dir) directory report_dir task :report_dirs => [REPORT_DIR, report_dir] - task :test => "test_#{dir}" + task 'test:python' => "test_#{dir}" +end + +namespace :test do + desc "Run all python tests" + task :python, [:test_id] end desc "Run all tests" -task :test, [:test_id] => :test_docs +task :test, [:test_id] => [:test_docs, 'test:python'] desc "Build the html, xml, and diff coverage reports" task :coverage => :report_dirs do