IntelliJ IDEA 11.1 Web Help

11.0+

The following is available only in the Ultimate edition of IntelliJ IDEA

IntelliJ IDEA provides a dedicated action that allows to perform run with code coverage measurement. The code coverage data are processed according to the option selected in the Coverage page of the Settings dialog.

To run with code coverage measurement
  1. Do one of the following:
    • Open the desired file in the editor, and choose Run <name> with coverage on the context menu. When running tests with coverage, note that you can run the entire test class, or each individual test method, depending on the caret location.
    • Select the desired run/debug configuration, and then on the main menu choose Run | Run <run/debug configuration name> with coverage.
    • On the main toolbar, click runWithCoverage. This will launch the selected run/debug configuration.
  2. If Show options before applying coverage to the editor has been selected in the Coverage page of the Settings dialog, choose whether you want to replace the active coverage suites, add collected data to the active suites, or do not apply coverage data. You can also opt to skip this dialog in the future.

    In case any other option has been selected, the respective action will be performed silently.

  3. Explore the collected coverage data in the Coverage tool window.

See Also

Concepts:

Procedures:

Reference:

Web Resources: