To run a single test and get stdout, with proper env config::
This is an example of how to run a single test and get stdout, with proper env config.
::
python manage.py cms --settings test test contentstore.tests.test_import_nostatic -s
To run a single test and get stdout and get coverage::
These are examples of how to run a single test and get stdout and get coverage.
::
python -m coverage run --rcfile=./common/lib/xmodule/.coveragerc which ./manage.py cms --settings test test --traceback --logging-clear-handlers --liveserver=localhost:8000-9000 contentstore.tests.test_import_nostatic -s # cms example
python -m coverage run --rcfile=./lms/.coveragerc which ./manage.py lms --settings test test --traceback --logging-clear-handlers --liveserver=localhost:8000-9000 courseware.tests.test_module_render -s # lms example
python -m coverage run --rcfile=cms/.coveragerc `which ./manage.py` cms --settings test test --traceback common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
...
...
@@ -271,7 +294,9 @@ tests::
paver test_js
To run a specific set of JavaScript tests and print the results to the
console::
console, run these commands.
::
paver test_js_run -s lms
paver test_js_run -s lms-coffee
...
...
@@ -281,7 +306,9 @@ console::
paver test_js_run -s common
paver test_js_run -s common-requirejs
To run JavaScript tests in a browser:
To run JavaScript tests in a browser, run these commands.
::
paver test_js_dev -s lms
paver test_js_dev -s lms-coffee
...
...
@@ -331,42 +358,58 @@ supported development enviornment for the edX Platform.
* mySQL
To run all the bok choy acceptance tests::
To run all the bok choy acceptance tests run this command.
::
paver test_bokchoy
Once the database has been set up and the static files collected, you
can use the 'fast' option to skip those tasks. This option can also be
used with any of the test specs below::
used with any of the test specs below.
::
paver test_bokchoy --fasttest
To run a single test, specify the name of the test file. For example::
For example to run a single test, specify the name of the test file.
::
paver test_bokchoy -t lms/test_lms.py
Notice the test file location is relative to
common/test/acceptance/tests. For example::
common/test/acceptance/tests. This is another example.