edx/edx-platform — pull request #677 by wedaly (2013-08-14 19:56:42+00:00)
Title: Will/js test tool integration

[js-test-tool](https://github.com/edx/js-test-tool) provides an easy-to-use interface for defining JavaScript test suites, running tests, and collecting coverage information. This PR integrates the tool into our testing infrastructure.

Key features:

* Test suites are defined in YAML files for lms/static, cms/static, common/static, and xmodule, including both JavaScript and CoffeeScript.

* The django-jasmine dependency has been removed. You can now run JS tests without starting up Django!

* All tests run in Firefox. This will allow us to test HTML5 functionality (e.g. VideoAlpha). js-test-tool uses Selenium to run the tests, so we can change this to any WebDriver-compatible browser in the future.

* Disabled tests (capa and VideoAlpha) are still disabled; I'll enable them in a separate PR.

* XML coverage information is reported for all source files in `reports/javascript/coverage.xml`. The package is set to "javascript" so we can filter just JS coverage in Jenkins.

* Diff-cover now generates one report for all Python and JavaScript. This is in a different location than Jenkins expects, so we'll need to update the Jenkins jobs once this gets merged (currently, it will show 404's if you look at diff coverage for this PR)

* js-test-tool provides a "developer" mode specifically for writing and debugging the test suite. This will load the tests into your default browser and continue serving the test pages until you terminate the tool.

New commands:

# Run all JavaScript tests and print results the the console
rake js_test

# Run all JavaScript tests and collect coverage information
rake js_test:coverage

# Run the JavaScript tests in your default browser
rake js_test:dev[lms]
rake js_test:dev[cms]
rake js_test:dev[common]
rake js_test:dev[xmodule]

# Run the JavaScript tests and print results to the console
rake js_test:run[lms]
rake js_test:run[cms]
rake js_test:run[common]
rake js_test:run[xmodule]

Reviewers: @jzoldak