Discussion:
[Openjmx-devel] JUnit flame
Bordet, Simone
2002-01-30 14:21:19 UTC
Permalink
<flamemode>

Ok, JUnit really sucks. REALLY.

Apart for very simple stuff, it is really not good.

So I thought, ok, should be extensible, and went to take a look at the code.
My god, a mess, a real mess.

These XP and pattern experts (Beck and Gamma) did an awful job.

You can find in Javadocs:
"Parts of this method was written at 2337 meters in the Hüffihütte, Kanton Uri".
Hey, Switzerland is beautiful, but this one burned his brain at that altitude, and wrote crappy stuff.

Has anyone tried to write tests so that some initialization code is run once per test class in an easy way (and please don't talk to me about TestSetup, another crappy thing) ?
This is only one of the missing pieces.

Wanna take a look to a bad design ?

Interface Test depends on class TestResult, ok this far.
Test should be the main interface for tests: wanna write a fully custom test ? just implement it.
You cannot, because TestResult depends on a subclass of Test, TestCase :(

And no separation between what the user implements and framework classes that run that implementation.

Sooner or later, I will replace it. Hurts me.

</flamemode>

:)

Simon
Dmitri Colebatch
2002-01-30 18:31:05 UTC
Permalink
lol. one thing I learnt using junit (only recently) is that to use it in
the non-gui mode. you'll need to change the nongui class to call system.exit
when all the threads have finished, as swing classes are initialized, and
hence you get the swing thread running - it just sits there....

anyway, just in case you get stuck on it (o:

cheers
dim


----- Original Message -----
From: "Bordet, Simone" <***@compaq.com>
To: "OpenJMX-Dev (E-mail)" <openjmx-***@lists.sourceforge.net>
Sent: Thursday, January 31, 2002 3:20 AM
Subject: [Openjmx-devel] JUnit flame


<flamemode>

Ok, JUnit really sucks. REALLY.

Apart for very simple stuff, it is really not good.

So I thought, ok, should be extensible, and went to take a look at the code.
My god, a mess, a real mess.

These XP and pattern experts (Beck and Gamma) did an awful job.

You can find in Javadocs:
"Parts of this method was written at 2337 meters in the Hüffihütte, Kanton
Uri".
Hey, Switzerland is beautiful, but this one burned his brain at that
altitude, and wrote crappy stuff.

Has anyone tried to write tests so that some initialization code is run once
per test class in an easy way (and please don't talk to me about TestSetup,
another crappy thing) ?
This is only one of the missing pieces.

Wanna take a look to a bad design ?

Interface Test depends on class TestResult, ok this far.
Test should be the main interface for tests: wanna write a fully custom test
? just implement it.
You cannot, because TestResult depends on a subclass of Test, TestCase :(

And no separation between what the user implements and framework classes
that run that implementation.

Sooner or later, I will replace it. Hurts me.

</flamemode>

:)

Simon

Loading...