Clear code coverage information in IntelliJ

JavaIntellij IdeaCode Coverage

Java Problem Overview


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?

Java Solutions


Solution 1 - Java

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

Solution 2 - Java

enter image description here

You can just Right Click on your Project,

Goto Analyze -> Hide Coverage data

Solution 3 - Java

  1. double shift;
  2. input hide;
  3. choose Hide Coverage data;
  4. Over.

Solution 4 - Java

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

Solution 5 - Java

Go to View > Tool Windows > Coverage

Click on the small icon button Delete Coverage Database

Clean coverage database

Solution 6 - Java

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiondevoured elysiumView Question on Stackoverflow
Solution 1 - JavaMaciej DobrowolskiView Answer on Stackoverflow
Solution 2 - JavaAbhilash ReddyView Answer on Stackoverflow
Solution 3 - JavaHouFengView Answer on Stackoverflow
Solution 4 - JavaPartha SarmaView Answer on Stackoverflow
Solution 5 - JavaKunalView Answer on Stackoverflow
Solution 6 - JavaMd Ayub Ali SarkerView Answer on Stackoverflow