Over a million developers have joined DZone.

JUnit Plugin: Better But Still Neglected

· Java Zone

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

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

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}