PyCharm 2017.2 Help

Coverage Tool Window

View | Tool Windows | Coverage

In this section:


/help/img/idea/2017.2/arrowUp.pngClick this button to go up one level.
/help/img/idea/2017.2/flattenPackages.pngWhen this button is pressed, all the packages are displayed as a single-level view.
/help/img/idea/2017.2/autoScrollToSource.png When 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.
/help/img/idea/2017.2/autoscrollFromSource.png When 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.
/help/img/idea/2017.2/exportToTextFile.png Click this button to generate a code coverage report and save it to the specified directory. See Generating Code Coverage Report for details.

The button is not available when the tests are executed on Karma because a coverage report is actually generated on the disk every time Karma tests are run. 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.

/help/img/idea/2017.2/close.png Click this button to close the tool window.
/help/img/idea/2017.2/icon_help.png Click this button to show reference.

Context menu

Jump to Source F4 Choose this command to open the selected file in the editor.
Last modified: 26 October 2017

See Also