Clear code coverage information in IntelliJ
Asked Answered
S

8

145

I have configured IntelliJ to paint the background of any line that has been executed at runtime to green when running in Coverage mode.

At times, I would like to just make all the files in the project revert back to their old and typical background colors, i.e, to remove all the coverage information.

Is that possible? How?

Scoville answered 29/7, 2015 at 22:39 Comment(0)
R
249

just close the coverage window with "x" button:

closing window

update: for the recent IntelliJ IDEA 2018.2.x, you can hide coverage by clicking left-hand side coverage bar (the colored one, close to line numbers) and then Hide coverage link:

closing window in IDEA 2018.2.x

Rosinweed answered 29/7, 2015 at 23:25 Comment(3)
Note: the coverage window may be minimized... expand it firstHendecahedron
That X is gone in 2018.2.3 and the "-" only hides the tool :( Now only the menu helps: Analyze - Hide coverageRetral
@Retral you can close tab inside Coverage tool with xGooding
C
123

enter image description here

You can just Right Click on your Project,

Goto Analyze -> Hide Coverage data

Camarilla answered 18/8, 2017 at 18:16 Comment(3)
Ctrl + Alt + F6 : This is the shortcutAcrefoot
This option was moved : Run -> Hide coverageKamasutra
Thanks! I had some trouble finding the setting!Shoreward
R
98
  1. double shift;
  2. input hide;
  3. choose Hide Coverage data;
  4. Over.
Railroader answered 25/2, 2019 at 7:33 Comment(3)
love it! and leant double shift 👍Creed
No need step 4. : )Creedon
nailed it bro @Curlpaper
A
25

After the newer update, it seems the "Hide Coverage" option is removed from the "Analyze" section. You can find the "Hide Coverage" option in the "Run" menu

Axes answered 4/6, 2020 at 10:23 Comment(1)
For new version that's corectDecompose
C
17

Go to View > Tool Windows > Coverage

Click on the small icon button Delete Coverage Database

Clean coverage database

Completion answered 10/5, 2016 at 14:56 Comment(2)
I didn't have this icon, but opening and closing the view with "X" did it..Width
Hmm, may I ask about this screen shot? What on earth is "Cloverage?"Banneret
E
5

To view/close code coverage results => Run the desired class with coverage, select suite to show, and open class in the editor. => On the main menu, choose Analyze | Show/remove Code Coverage Data.

Encomium answered 23/2, 2017 at 19:35 Comment(0)
E
5

2022 Update: now it's moved to Run -> Show Coverage Data

You can select which you want to show or hide.


Enclosure answered 11/8, 2022 at 23:29 Comment(0)
V
0

The answer from parse is still valid in 2023.3. Also, I use it with the reverse use-case to show former coverage data that intellij has hidden due to closing the coverage report

Vargo answered 20/12, 2023 at 10:41 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewHellas

© 2022 - 2024 — McMap. All rights reserved.