Christian Bauer on TestNG (and other things)

Christian Bauer, one of the developers of Hibernate and co-author (with Gavin King) of the excellent Hibernate book, Hibernate in Action, writes in the Hibernate blog on using TestNG.

I don’t have any experience with TestNG, but have used JUnit extensively. From the comments in his blog, Christian seems very excited about using TestNG to test EJB3.0 beans, but the thing that I am not sure about (and I may be wrong about this), is that it looks like it depends on the EJB3.0 container to be booted in order to run the tests. Isn’t this moving away from the core principals of unit testing? It seems like TestNG is more like a Cactus-like framework that tests things inside the container?

Also, what happened to the promises of testing EJB3.0 components outside of the container, as now they are more like POJOs with simple annotations?

On another note, Christian mentions that the updates to the Hibernate in Action for the second edition are 95% complete, so hopefully we’ll be seeing that on shelves soon.

12/23/05 – Christian emailed me to clafify a couple of points: the mapping sections of the book are 95% complete, but there is still the last 3rd of the book to complete, so it doesn’t sound like it will be ready for a while yet.

Additional comments from Christian:

– You need the EJB3 container (which starts in 2 seconds on my machine) to do integration testing. You don’t need it for unit testing.

– You can test EJB3 beans without a runtime container. Just instantiate them and call a method, they are POJOs.

– TestNG can do whatever you like, it is not bound or tied to anything. It just happens that it makes integration testing very easy, something JUnit makes very difficult.”

So TestNG can be used to integration test EJB3.0 beans when running in the container, but the key point is that EJB3.0 beans are just POJOs and can get tested outside of the container. Thanks for the clarifications.

XBox 360 special ‘feature’

It wouldn’t be a Microsoft product if it didn’t include some special ‘features’. What features am I talking about? The hangs, error messages, blank screens, reboots.

It’s only been out on the market for a couple of days and the reports of crashes are already streaming in – check out the posts on the Engadget website.

Was the XBox360 released too early?

So far not so good for Microsoft. The intial reviews are lacklustre and people are recommending to hold off buying a shiny new 360, for the timebeing at least.

A quick search on Google for ‘XBox 360 review’ brings up the following:

  • Gizmodo: “Meh, it’s okay”
  • CNet.com: a sumary of reviews, concluding “so-so”
  • NY Post: “Don’t buy the XBox 360 – why this year’s hottest holiday gify is overhyped”

So what’s going wrong? Did Microsoft take a gamble getting the new console to market early ahead of Sony’s PS3 (which may not appear for several more months), only to end up with a mediocre line up of games? Possibly. We probably haven’t seen what the new 360 can really do yet, and that will be 6 months or so, or even upto a year before the software houses are getting to grips with the new hardware and can produce a game that will really show what the console can do. But by that time the PS3 may be on the shelves, and then the game changes yet again as the attention may swing in the other direction to be all eyes on the shiny new PS3…