Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure default coverage runner in idea?

I know that in idea I can choose coverage runner on Run/Debug configuration like this:

enter image description here

but then I select class in tree I see the following menu:

enter image description here

And I cannot configure coverage runner here.

Is it possible to configure coverage runner tool to use by default?

like image 891
gstackoverflow Avatar asked Aug 28 '15 12:08

gstackoverflow


People also ask

How do you set code coverage?

To calculate the code coverage percentage, simply use the following formula: Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.


1 Answers

In Run Configurations, at the bottom of the left side, there is a Defaults section. In there, you can set the default coverage runner for each type of run. It looks like you're using JUnit above, so select JUnit, then the Code Coverage tab. Choose your coverage runner. Each new run configuration will now use that coverage runner. Pre-existing run configurations won't be changed.

like image 171
Crunch Avatar answered Sep 17 '22 08:09

Crunch