2009-11-03

Coverage Analysis on J2ME

Since I do TDD also on J2ME I also want to analyze the code coverage. We all know that green doesn't mean good but red definitely means bad. So I think coverage analysis is a good thing.

While for JSE/JEE there are a lot of options things are different on J2ME.

I only know of two free projects.

The first one is JInjector by Google. (http://code.google.com/p/jinjector/)

You can do much more than coverage analysis with it. (In fact I think that coverage analysis in JInjector is just a by-product.)

BUT it's not easy to configure and to use. So I had a look at Cobertura for J2ME ( http://www.cobertura4j2me.org/ ).

It's pretty easy to use and integrates nicely with ANT. So I use it. There's only one big drawback: It's terribly slow!

On one of my MIDlets running the tests with Cobertura4J2ME took 7 minutes while running the tests without took only 38 seconds.

Unfortunately there doesn't seem to be any activity on this project so I will either have to live with it or fix it myself. (I really like to do that but currently I just don't have the time for it).

No comments:

Post a Comment