The Packages and classes to include in coverage data and Packages and classes to exclude from coverage data areas allow you to narrow down the code coverage scope.Ĭlick, then click Add Class or Add Package, and select the necessary items. This will let see which tests are the most relevant for each piece of the code. Enable this option if you want to know exactly what lines of code have been covered by specific tests. The Track per test coverage option allows tracking individual code coverage produced by each test case. The Tracing mode enables the accurate collection of the branch coverage with the ability to track tests, view coverage statistics, and get additional information on each covered line. The Sampling mode enables collecting line coverage with negligible slowdown. (For the IntelliJ IDEA runner) select the mode that you want to use: Sampling or Tracing. Open the Code Coverage tab and select a code coverage runner from the Choose coverage runner list: IntelliJ IDEA, EMMA, or JaCoCo. If you haven't created the required configuration yet, refer to the Create a run/debug configuration from a template procedure that will guide you through the process. From the main menu, select Run | Edit Configurations and click the necessary configuration on the left panel.