Rob Williams is a probabilistic Lean coder of Java and Objective-C. Rob is a DZone MVB and is not an employee of DZone and has posted 171 posts at DZone. You can read more from them at their website. View Full User Profile

JUnit Plugin: Better But Still Neglected

  • submit to reddit
In his book The Cathedral and the Bazaar Eric Raymond tried to lay out the ‘code‘ of the open source world (so Hemingway), and notes that the darkest taboo is to shame people‘s work. By that measure, I guess I am worse than O-eddy-pus in my rantings here, but come on: what kind of world do we have if we just eschew criticism no matter the cost. And, yes, my friends, there is a cost.

Case in point. I went back to JUnit recently because I was doing PDE dev, and was pretty happy with it. Then I realized that I liked the methods v. the assert statement and did a converter to convert my TestNG tests, in part because that plugin seems to be getting no love these days, and there are even stupid things that the JUnit plugin does that theirs does not. For instance, I like the idea of the shortcut for creating new tests and suites. Notice, I used the word ‘idea.‘ In practice, I have to adapt the products the JUnit stuff puts out. For instance, if you ask it to generate a test for you, it is smart enough to do a 4.x version, with annotations, and will generate the setup/teardown stuff, but it does not give me an easy way to alter the template so the runner I need for a Spring test I add using a keyboard template. The suites are another matter. I went to generate one today. This clearly has just been left to rot in a 3.8-only in-carn-ation (never realized that that word could be etymologically interpreted as ‘meatless‘: in = not, carn = meat). Yes, friends, there is NO meat here. Nothing to be adapted, nothing to be saved for that matter. It doesn‘t even see your classes.

The pity is that generating suites should be stupid simple using the new version 4 approach: it‘s just a bloody class with an annotation listing other classes!

Beckons to the Fowler/Churchill thing: never have so few lines of code done so much for so many… a few more would be really nice too. Maybe I‘ll look and see if the plugin itself is open source…



Published at DZone with permission of Rob Williams, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Matthew Hall replied on Mon, 2009/03/30 - 10:31am

Therefore.. what?  I do not see where you are going with this post.

Rob Williams replied on Thu, 2009/04/02 - 11:09pm

There are two test frameworks. The introduction of TestNG sparked the first real competition we had ever seen in unit testing tools, but now it's settled down and the dominant tool is left to languish with silly maintenance tasks left undone. That's kind of it in a nutshell.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.