JUnit Plugin: Better But Still Neglected

DZone 's Guide to

JUnit Plugin: Better But Still Neglected

· Java Zone ·
Free Resource
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…


From http://www.jroller.com/robwilliams


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}