I'm trying to get EMMA to provide unit-testing coverage with EMMA on a J2EE app, and am finding that EMMA is only providing statistics on the POJOS, but not on the ejb's. I've followed the directions, and have my ejb's deployed to a properly set-up weblogic 8.1.5 instance. My question is, I've read that the emma.metadata file has to be deployed in the EJB, but haven't seen any documentation on exactly where in the EJB it should go. Any help?
Uhm, I wouldn't consider EMMA to be an obscure acronym, in fact it's not. An ancronym that is. At least not to my knowledge, but I have been known to be mistaken. On the ever so rare occasion, of course EMMA is a free open-source Java code coverage tool, and a pretty popular one at that. So I guess it's not really obscure either...
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Ok... For the masses. Emma is a code-coverage utility freely available under a GPL. Code-coverage, as used in reference to Emma, is the number of classes, methods or lines of code that are exercised by Unit tests.
Emma works with Java, but it appears to have issues quantifying the coverage of decoupled code, for example with the J2EE. What I'd like to know is, has anyone here successfully used EMMA to get the code-coverage of: Entity beans, Session Beans, or Message beans. if you have, could you share what you did?
I also used to date a girl named Emma. Not the prettiest thing, but she was a wild woman in th... Well, thats probably a better story for next time.
Mike, I agree Emma is not an obsure acronym and shouldn't need definition in a testing forum. I've used Emma with my unit tests, but not on the server. I know someone who did use it on the server, but wound up putting the file in their JAVA.HOME directory. I didn't reply with this yesterday because it seems to conflict with what you know in your initial post.
As it turns out, the emma tool created a coverage.ec file in the base directory of the Weblogic service. When this was copied into the emma.dir, the emma.report correctly accounted for all ejb's. Too bad some of the above posters were too focused on being snarky than helping.