1

We use SCCT to get code coverage for our Play Framework project. It works great, but doesn't make it particularly easy to find where most of the missing lines are. It shows the percentage of each file covered, but doesn't give any idea of how big those files are. I'm more worried about the 70%-covered 1000-line file than the 50%-covered 30-line file.

Ideally, I'd like a list of all files, sorted by the number of uncovered lines. Any idea how to get that information from SCCT's output?

Edit: Some commenters think I'm worried about tracking the absolute number of uncovered lines. Rather, I just want to be able to find hotspots of uncovered functionality by using SCCT's line coverage as a heuristic. Any help would be appreciated.

Ben Dilts
  • 10,535
  • 16
  • 54
  • 85
  • I use scct, but with a grain of salt. There will always be "uncovered" lines that are not due to a fault in testing. For instance, when you use scala's case class, a few methods are created for you including toString(), equals() and hashCode(), getters and setters, etc. If you don't use those methods in your tests, they'll show up as uncovered. – egprentice May 02 '14 at 18:26
  • SCCT is line based, so is not representative of your coverage at all, as well as all the synthetic methods scala generates. Take a look at https://github.com/scoverage. – sksamuel May 14 '14 at 13:57

0 Answers0