Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JaCoCo with IntelliJ

So this question might not be really specific, but i'm asking it anyway.

I'm trying to use JaCoCo with IntelliJ to gather coverage reports on unit tests. However, i don't have any experience whatsoever to set this up.

In Netbeans you just have to install the JaCoCo plugin and select to test with coverage. How does this work in IntelliJ?

I have googeled for quite a while without success. If someone has a good tutorial to set this up, i'd really appreciate it!

like image 281
Ixbitz Avatar asked Apr 19 '17 16:04

Ixbitz


2 Answers

You don't need to do anything, if you have a recent version of IntelliJ. Just select to use JaCoCo as the coverage tool in the run configuration for your test suite or project and it will use its built-in JaCoCo version.

like image 114
jwenting Avatar answered Sep 19 '22 13:09

jwenting


To elaborate on jwenting's answer, go to Run > Edit Configurations..., and on the Code Coverage tab of your Run Configuration, select JaCoCo from the Choose coverage runner dropdown.

Run Configuration Screenshot

like image 26
solimant Avatar answered Sep 17 '22 13:09

solimant