summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst')
-rw-r--r--testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst b/testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst
new file mode 100644
index 000000000..965b4a4ee
--- /dev/null
+++ b/testing/web-platform/tests/tools/pytest/doc/en/test/plugin/coverage.rst
@@ -0,0 +1,51 @@
+
+Write and report coverage data with the 'coverage' package.
+===========================================================
+
+
+.. contents::
+ :local:
+
+Note: Original code by Ross Lawley.
+
+Install
+--------------
+
+Use pip to (un)install::
+
+ pip install pytest-coverage
+ pip uninstall pytest-coverage
+
+or alternatively use easy_install to install::
+
+ easy_install pytest-coverage
+
+
+Usage
+-------------
+
+To get full test coverage reports for a particular package type::
+
+ py.test --cover-report=report
+
+command line options
+--------------------
+
+
+``--cover=COVERPACKAGES``
+ (multi allowed) only include info from specified package.
+``--cover-report=REPORT_TYPE``
+ html: Directory for html output.
+ report: Output a text report.
+ annotate: Annotate your source code for which lines were executed and which were not.
+ xml: Output an xml report compatible with the cobertura plugin for hudson.
+``--cover-directory=DIRECTORY``
+ Directory for the reports (html / annotate results) defaults to ./coverage
+``--cover-xml-file=XML_FILE``
+ File for the xml report defaults to ./coverage.xml
+``--cover-show-missing``
+ Show missing files
+``--cover-ignore-errors=IGNORE_ERRORS``
+ Ignore errors of finding source files for code.
+
+.. include:: links.txt