CrazySynthax
CrazySynthax

Reputation: 15018

IntelliJ Code Coverage: how to know which unit tests covered lines in source code

I'm pretty new to this awesome feature of IntelliJ. When I run code coverage, I can see in the IDE green marks that indicate the line was covered and red marks that indicate the line was not covered. It's great, but I want to see what were the unit tests that covered these lines.

When I click the green marks, I only see number of hits:

enter image description here

Do you know how to see it?

Upvotes: 6

Views: 2210

Answers (1)

Olga Klisho
Olga Klisho

Reputation: 1394

At first you need to enable the "Tracing" in Run configuration: enter image description here

Then you may use "Show tests covering line" button: enter image description here

Upvotes: 9

Related Questions