Search This Blog

Wednesday, April 1, 2009

Liking Emma and FindBugs Eclipse Plugins

I have found myself liking two helpers as I continue to develop, Code Coverage and Finding Bugs. I usually use plugins in maven reporting to help me find issues and coverage information after issuing a "mvn site".

I however prefer to catch the same without having to generate the maven site though and in my IDE. I see two nice eclipse plugins for the same. For the Code Coverage part, I quite like the Emma Eclipse plugin which allows me to run my unit tests in "Coverage" mode and helps me determine the amount of code coverage my unit tests are providing. The coloring is pretty good, green for fully covered code, red for missed code and yellow for partially covered code. Trying to be green...

I have also started to use the Find Bugs eclipse plugin. Professional "Hara Kiri" here but I often get pleasantly surprised by what the utility finds for me :-). It would have been nice if the "Problems" tab in Eclipse showed the issues found by "Find Bugs" via a different icon. Also I am refraining from showing results of either plugin here for obvious reasons :-))))

3 comments:

Dave Stockmann said...

Thanks! These are just what I have been looking for!

Sanjay Acharya said...

Glad to hear :-)...pretty neat what find bugs catches and emma is quite indicative regarding paths covered and not covered.

Ladue Middle School Student said...

Hey Sanjay hows it going there..

I have found Cobertura to be a good tool, it gives you branch coverage and cyclomatic complexity numbers as well. Emma gives you line level coverage which is good, but is not the full picture.

See article here by Andrew Glover
http://www.ibm.com/developerworks/java/library/j-cq01316/index.html

Cobertura has been updated since that article and has reduced the gaps mentioned

I have used FindBugs as well and certainly agree, it can find some interesting things