JUnit: reloading classes before each run

I'm asking about this here before filing a bug report, in case I've just
missed something.

JUnit has a properties file called excluded.properties that gives one a way
to prevent classes in specified packages being loaded by the class loader
used to implement the "reload classes every run" feature. This is sometimes
necessary to ensure that classes are found in the correct place: For
example, to ensure that the VisiBroker org.omg.CORBA.ORB, not the one that
ships with the JDK, is loaded when VisiBroker is in use. I can't seem to
find a placement for this properties file where it will be found when JUnit
tests are executed from the IDE. Furthermore, the state of the "reload
classes every run" check box is not retained across invocations of the
Run|JUnit Tests... command, so I have to allow the test to fail the first
time before I have an opportunity to clear it. This is... tedious.

So what's the story: user error or bug?


1 comment
Comment actions Permalink

Michael Besosa wrote:

I'm asking about this here before filing a bug report, in case I've just
missed something.

JUnit has a properties file called excluded.properties that gives one a way
to prevent classes in specified packages being loaded by the class loader
used to implement the "reload classes every run" feature. This is sometimes
necessary to ensure that classes are found in the correct place: For
example, to ensure that the VisiBroker org.omg.CORBA.ORB, not the one that
ships with the JDK, is loaded when VisiBroker is in use. I can't seem to
find a placement for this properties file where it will be found when JUnit
tests are executed from the IDE. Furthermore, the state of the "reload
classes every run" check box is not retained across invocations of the
Run|JUnit Tests... command, so I have to allow the test to fail the first
time before I have an opportunity to clear it. This is... tedious.

So what's the story: user error or bug?

I hate this as well.
a workaround is a setting in junit.properties in your home dir.
or you add your own main methods with "-noloading" argument (my choice).
I asked about a setting in IDEA long ago, but then after the move to ITN
never filled the formal request. you're welcome to do it.

Edo
--
Edoardo Comar
Cape Clear Software
http://www.capeclear.com

Register for our Web Services Seminar tour - "Lowering the Cost of
Business Integration".
See http://www.capeclear.com/seminars for details

0

Please sign in to leave a comment.