• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Emma and RMI

 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic