Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

JUnit Plugin: Better But Still Neglected

DZone's Guide to

JUnit Plugin: Better But Still Neglected

· Java Zone ·
Free Resource

The CMS developers love. Open Source, API-first and Enterprise-grade. Try BloomReach CMS for free.

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

BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}