Home / Java Patterns and Pitfalls     frequal.com

Emma Limitations

First off, let me say that Emma is a fantastic coverage measurement and reporting tool. Not too hard to set up and great reports without tweaking. So this document should be considered as constructive criticism of a great tool -- an admirers view of a few minor imperfections.

No Per-Method Exclusion

The rich filtering syntax allows you to exclude classes. However, if there is a class with one method that you don't want included in the reports, you are out of luck as of release 2.0.5312. FAQ entry 2.10 mentions that it is being considered for a future release.

This is an issue if you have a private constructor in a static Singleton, for example. The constructor will never be invoked by a test class, since it is private, but it is included in coverage numbers as untested code, preventing your Singleton from ever reaching 100% coverage.


Last modified on 7 Nov 2007 by AO

Copyright © 2016 Andrew Oliver