PyCharm 2021.2 Help

Coverage Tool Window

View | Tool Windows | Coverage

This tool window appears on running with coverage, and displays coverage measurement results.


the Up buttonClick this button to go up one level.
the Flatten Packages buttonWhen this button is pressed, all the packages are displayed as a single-level view.
the Jump to Source buttonWhen this button is pressed, source code of the class selected in the tool window, automatically opens in a separate editor tab, and gains the focus.
the Jump from Source buttonWhen this button is pressed, when source code of certain class gets the focus in the editor, the corresponding node is automatically highlighted in the tool window.
the Generate report button

Click this button to generate a code coverage report and save it to the specified directory. See Generating code coverage report for details.

Every time Karma tests are run, a coverage report is actually generated on the disk. The format of a coverage report can be configured in the configuration file, for example:

// karma.conf.js module.exports = function(config) { config.set({ ... // optionally, configure the reporter coverageReporter: { type : 'html', dir : 'coverage/' } ... });};

The following type values are acceptable:

  • html produces a bunch of HTML files with annotated source code.

  • lcovonly produces an file.

  • lcov produces HTML + .lcov files. This format is applied by default.

  • cobertura produces a cobertura-coverage.xml file for easy Hudson integration.

  • text-summary produces a compact text summary of coverage, typically to the console.

  • text produces a detailed text table with coverage for all files.

Context menu

Jump to SourceF4Choose this command to open the selected file in the editor.

Title bar context menu and buttons

You can right-click the window title bar and use the context menu to configure its viewing mode, associate the window with a different tool window bar, or resize and hide the window.

You can also use the toolbar buttons:

Scroll from Editor

Automatically sets the focus on the object name in the Project view when the editor area is in focus.

Hide tool windowShift+Escape

Hide the tool window.

To hide all the tool windows, press Ctrl+Shift+F12.

Last modified: 15 October 2021