scoverage / sbt-scoverage

sbt plugin for scoverage
Apache License 2.0
648 stars 155 forks source link

Per-test coverage report? #314

Open cbrunnkvist opened 3 years ago

cbrunnkvist commented 3 years ago

Is there a way to correlate the name of tests to different files / section of the coverage report? Or vice-versa.

I'm doing some test analysis automation and even a "tests-to-source-files-covered" map would be of great value. As of now, if I have a change to source file F, I have no way of knowing which test classes are relevant to this file, even less so to which lines of that file.

cbrunnkvist commented 3 years ago

We can see an example of something similar used in the context of mutation testing.

(n.b. JS in the linked example - but the same principle)

ckipp01 commented 3 years ago

This should be somewhat possible. We just merged in https://github.com/scoverage/sbt-scoverage/pull/297 which will include test names which would then be able to be grouped and mapped.