Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

EMMA and J2EE

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gents and Ladies,

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?
 
Michael Van
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
REally? Nobody? REally? come on now, someone has to know this. Please share your wisdom, o knowledgable ones!
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used to date a woman named EMMA. She didn't know much about Java or POJO.
 
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In other words, if you're going to reference an obscure acronym, it's best to define what you are talking about.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Bear Bibeault
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And yet, all I hear is crickets....

Again, my point is, if you want help on something, provide some information on what you are asking about.
 
Michael Van
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, I''m guessing you already read the related FAQ entries, and they didn't help solve your problem?
[ September 24, 2008: Message edited by: Jelle Klap ]
 
Marshal
Posts: 27289
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also scanned that FAQ, and the EMMA documentation, just out of interest. None of them contained any mention of an emma.metadata file so I came up with nothing.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the classes instrumented by EMMA the same classes used by the J2EE server at runtime or is there some code generation happening? That could mess up the statistics...
 
author & internet detective
Posts: 41185
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Michael Van
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic