• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Emma and RMI

 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I saw some reference to the Emma tool for coverage testing, so I decided to give it a try.

Although it looks promising, I cannot get my server to run with it. An exception is thrown when the server does Naming.rebind() to register itself to the RMI registry.

Does anyone know what I need to change to make it work?

Thanks,

Frans.

The exception:

[ January 29, 2005: Message edited by: Frans Janssen ]
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Emma to do coverage testing and I use RMI. My server uses LocateRegistry.createRegistry to create a new registry or getRegistry to use an existing one and then uses registry.rebind() to connect to it. I have no trouble from Emma working this way.

I've actually found Emma to be very useful, the only problems I've had are that it doesn't work properly for methods that call System.exit() and it doesn't allow me to set -D options for the JVM, but these are just minor annoyances.

Coverage testing is definitely worth the trouble, you should try to get 100% coverage on important stuff like the LockManager.

Are you instrumenting your code beforehand or on the fly using emmarun? I use commands like

Do you use the -ix to tell it not instrument the stub?
[ January 30, 2005: Message edited by: peter wooster ]
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by peter wooster:
Are you instrumenting your code beforehand or on the fly using emmarun? I use commands like

Do you use the -ix to tell it not instrument the stub?


Hi Peter,

I did not notice I had to use special commands to exclude my stub classes, so that most likely is the cause of the problem.

I just used


I'll try the -ix parameter tonight (I am at work now ).

Thanks for your advice,

Frans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic