diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 109974a3d..940c47286 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -114,6 +114,7 @@ Rodrigue Cloutier Roger Hu Ross Lawley Roy Williams +Salvatore Zagaria Sandra Martocchia Scott Belden Sigve Tjora diff --git a/coverage/jsonreport.py b/coverage/jsonreport.py index 0c3f313d9..1f544b0d3 100644 --- a/coverage/jsonreport.py +++ b/coverage/jsonreport.py @@ -60,6 +60,8 @@ def report(self, morfs, outfile=None): self.report_data["totals"].update({ 'num_branches': self.total.n_branches, 'num_partial_branches': self.total.n_partial_branches, + 'covered_branches': self.total.n_executed_branches, + 'missing_branches': self.total.n_missing_branches, }) json.dump( diff --git a/tests/test_json.py b/tests/test_json.py index 2d2ae9f4a..92dee6d94 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -65,7 +65,9 @@ def test_branch_coverage(self): 'num_branches': 2, 'excluded_lines': 0, 'num_partial_branches': 1, - 'percent_covered': 60.0 + 'percent_covered': 60.0, + 'covered_branches': 1, + 'missing_branches': 1 } } self._assert_expected_json_report(cov, expected_result)