IntelliJ IDEA

Skip to end of metadata
Go to start of metadata
Search

Searching TeamCity 7.x Documentation

Table of Contents

IntelliJ IDEA coverage engine is the same engine that is used within the IntelliJ IDEA to measure code coverage. This coverage attaches to JVM as a java agent and instruments classes on the fly when they are loaded by JVM. In particular that means that classes are not changed on disk and can be safely used for distribution packages.

IntelliJ IDEA coverage engine currently supports Class, Method and Line coverage. There is no Branch/Block coverage yet.

Make sure your tests run in the fork=true mode. Otherwise the coverage data may not be properly collected.

To configure code coverage by means of IntelliJ IDEA engine, follow these steps:

  1. While creating/editing Build Configuration, go to the Build Runner page.
  2. Select Ant, IntelliJ IDEA Project, Gradle or Maven build runner.
  3. Select IntelliJ IDEA as a coverage tool in the Choose coverage runner drop-down.
  4. Set up the coverage options - find the description of the available options below.
    Option Description
    Classes to instrument Specify Java packages for wich code coverage should be gathered. Use patterns (one per line) that start with a valid package name and contain *. For example: org.apache.*.
    Classes to exclude from instrumentation Use regular expressions (one per line) to specify fully qualified class names which must be excluded from the coverage. Exclude patterns have higher priority than include patterns.



See also:

Concepts: Build Runner | Code Coverage
Administrator's Guide: Configuring Java Code Coverage | EMMA

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.