Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ 12 code coverage not working in editor for GWT Projects

I'm trying IntelliJ 12, and I can't manage to get the line colored (red, green, yellow) in the editors after running the tests with coverage. Did anybody noticed the problem or it's just me not being able to make it work?

like image 824
Luigi R. Viggiano Avatar asked Dec 16 '12 23:12

Luigi R. Viggiano


People also ask

Why Code Coverage is not showing in IntelliJ?

From the main menu, select Run | Show Coverage Data ( Ctrl+Alt+F6 ). In the Choose Coverage Suite to Display dialog, select the checkboxes next to the necessary suites, and click Show selected. IntelliJ IDEA opens the coverage results for the selected test suites.

How do I enable branch coverage in IntelliJ?

In IntelliJ to add "branch coverage" to the coverage window, you can go to Run/EditConfiguration then proceed to Modify options/coverage setting and enable use tracing.


1 Answers

By default code coverage results are displayed only in the left gutter and may be hard to notice:

coverage displayed in gutter

You can either change the gutter colors or configure IntelliJ IDEA to change the background of the whole lines (instead of the foreground) depending on their coverage status:

coverage background settings

Now it's much easier to see the coverage status:

coverage displayed as background

like image 111
CrazyCoder Avatar answered Oct 01 '22 21:10

CrazyCoder