Pages

Friday, December 05, 2008

EclEmma, a code coverage plugin for Eclipse

If you're an Eclipse user and you're full on with TDD, then you owe it to yourself to install the EclEmma plugin for Eclipse.  It's an open source tool for instrumenting code from within the Eclipse Workbench and then running tests to determine how much test coverage you have.  I've been a Cobertura user, but AFAIK there isn't a Cobertura plugin for Eclipse.  EMMA is another code coverage tool (and is baked into Jetbrains IntelliJ IDEA).  This plugin is very well done and really helped me to understand where I needed more tests.  The best thing about this plugin is that you can get code coverage on a single class that you're unit testing, so the turnaround time is very small for determining where you have holes in your test coverage.  Very impressive.  One gripe that I do have with it is the inability to turn off coverage on the tests.  I don't want to instrument those, but the tool seems to want to select the tests to instrument along with your source.  Not a big deal...I just ignored any of the coverage information pertaining to tests.

No comments:

Post a Comment