views:

967

answers:

3

What are the available code coverage tools for Scala?

I have Scala spec tests and a Hudson continuous integration set-up. Is there something I can hook-in to this setup to measure and track code coverage?

+3  A: 

I use Cobertura. However, any Java coverage tool should work just fine. The only catch is that you will end up with a large number of auto-generated classes in your coverage list. This is because while Scala compiles down into very natural JVM bytecode, it is forced to produce an unnaturally large number of classes to accommodate common functional features like lazy evaluation.

Daniel Spiewak
+5  A: 

Undercover( http://code.google.com/p/undercover/ ) is little better.

Thanks - will try it out soon.
arnab
+1  A: 

SCCT is a compiler plugin which instruments the classes to gather coverage data:

http://mtkopone.github.com/scct/

Joni