From 9a78a80aaf8f8161b857ebf3cf02dd511181dd07 Mon Sep 17 00:00:00 2001 From: Matt Bachmann Date: Mon, 8 Jul 2019 23:09:38 -0400 Subject: Create a JSON report --- doc/cmd.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'doc/cmd.rst') 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: -- cgit v1.2.1