PyCharm 2017.2 Help

Generating Code Coverage Report

PyCharm suggests two ways of generating HTML reports on the base of the code coverage measurement results: using the menu command, or using the Coverage tool window.

To generate a code coverage report

  1. Do one of the following:
    • On the main menu, choose Tools | Generate Coverage Report.
    • In the toolbar of the Coverage tool window, click /help/img/idea/2017.2/exportToTextFile.png.
  2. In the Generate Coverage Report dialog box that opens, specify the target directory where the generated report will be stored, and optionally select the check box Open generated HTML in browser.
  3. Click Save. PyCharm will store the generated report to the specified location, and also open it in the default browser, if the corresponding check box has been selected.

Please note that if you are going to save a code coverage report for one of the multiple projects opened in the same window, it is important to check the suggested target location, because PyCharm suggests the previously used location.

Last modified: 26 October 2017

See Also