Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.
Notice: I'm taking a break from blogging to focus on Atari Gamer . com, check it out!

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
Once I started writing unit tests for the objects I was persisting into the HRD in App Engine via JDO, I've noticed that the coverage for all of my classes was below 100%. This didn't seem right to me because I was certain that I was testing everything.

The coverage tool that I was using was EclEmma. After reading around and experimenting a little, I was certain that EMMA can't handle the instrumentation that the JDO post-compilation step does to the classes.

This is the kind of result I was getting with the EclEmma plugin:

As soon as I switched to the eCobertura plugin, my code coverage for the same class went to 100%.

There are some drawbacks of using eCobertura, it doesn't feel as mature and doesn't have as nice an interface or configuration screens, it's also noticeably slower. However, despite all of these, I am going to stick with it because it gives me accurate results.


Skip down to comments...
A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. If you spot something out of place, please do let me know.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...