summaryrefslogtreecommitdiff
path: root/docs/internals/contributing
diff options
context:
space:
mode:
Diffstat (limited to 'docs/internals/contributing')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 4de506a654..a828b06b36 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -163,6 +163,26 @@ associated tests will be skipped.
.. _gettext: http://www.gnu.org/software/gettext/manual/gettext.html
.. _selenium: http://pypi.python.org/pypi/selenium
+Code coverage
+~~~~~~~~~~~~~
+
+Contributors are encouraged to run coverage on the test suite to identify areas
+that need additional tests. The coverage tool installation and use is described
+in :ref:`testing code coverage<topics-testing-code-coverage>`.
+
+To run coverage on the Django test suite using the standard test settings::
+
+ coverage run ./runtests.py --settings=test_sqlite
+
+After running coverage, generate the html report by running::
+
+ coverage html
+
+When running coverage for the Django tests, the included ``.coveragerc``
+settings file defines ``coverage_html`` as the output directory for the report
+and also excludes several directories not relevant to the results
+(test code or external code included in Django).
+
.. _contrib-apps:
Contrib apps