summaryrefslogtreecommitdiff
path: root/doc/cmd.rst
diff options
context:
space:
mode:
authorMatt Bachmann <bachmann.matt@gmail.com>2019-07-08 23:09:38 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-08-31 07:24:08 -0400
commit9a78a80aaf8f8161b857ebf3cf02dd511181dd07 (patch)
treed73603d17fc5269a3b8199085bf67c436d99aedf /doc/cmd.rst
parent790f0b30010a3a1f68f4fa7c172ce3b31c7c4b24 (diff)
downloadpython-coveragepy-git-9a78a80aaf8f8161b857ebf3cf02dd511181dd07.tar.gz
Create a JSON report
Diffstat (limited to 'doc/cmd.rst')
-rw-r--r--doc/cmd.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/cmd.rst b/doc/cmd.rst
index 42738493..ad84a6ae 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -22,6 +22,7 @@ Coverage.py command line usage
.. :history: 20121117T091000, Added command aliases.
.. :history: 20140924T193000, Added --concurrency
.. :history: 20150802T174700, Updated for 4.0b1
+.. :history: 20190828T212200, added json report
.. highlight:: console
@@ -41,6 +42,8 @@ Coverage.py has a number of commands which determine the action performed:
* **html** -- Produce annotated HTML listings with coverage results.
+* **json** -- Produce a JSON report with coverage results.
+
* **xml** -- Produce an XML report with coverage results.
* **annotate** -- Annotate source files with coverage results.
@@ -292,7 +295,8 @@ Reporting
---------
Coverage.py provides a few styles of reporting, with the **report**, **html**,
-**annotate**, and **xml** commands. They share a number of common options.
+**annotate**, **json**, and **xml** commands. They share a number of common
+options.
The command-line arguments are module or file names to report on, if you'd like
to report on a subset of the data collected.
@@ -473,6 +477,17 @@ You can specify the name of the output file with the ``-o`` switch.
Other common reporting options are described above in :ref:`cmd_reporting`.
+.. _cmd_json:
+
+JSON reporting
+-------------
+
+The **json** command writes coverage data to a "coverage.json" file.
+
+You can specify the name of the output file with the ``-o`` switch.
+
+Other common reporting options are described above in :ref:`cmd_reporting`.
+
.. _cmd_debug: