my dog learned polymorphism
The moose likes JBoss/WildFly and the fly likes JBoss' suitability for automated tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Watch "JBoss New topic

JBoss' suitability for automated tests

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
For the past few years I've been using Jetty to support test automation by launching an embedded Jetty container on which to deploy various web components programmatically, run tests against it, etc. Can I do something like this with the new JBoss 5 release? Does it have an "embedding" API and if it does, is it as fast as Jetty to boot up in a test?

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Peter Johnson

Joined: May 14, 2008
Posts: 5852

There is nothing like this that I know of in the 5.0 release. Though that release is much more dependent on th4e microcontainer, and many of the services are moving to be microcontainer based. And that should aide in performing tests without having to launch the whole server. But that capability would be dependent on each individual service - in other words, there would not be a overall JBossAS approach.

JBoss In Action
Javid Jamae
Ranch Hand

Joined: May 14, 2008
Posts: 198
If you're using EJB3, there is an embeddable JBoss container. This is the EJB3 container that can be used outside of JBoss (such as in Tomcat or WAS). Here is some info:

The nice thing about EJB3 is that you can easily unit test most of your components because they're just POJOs. If you want to do more integration-style testing, the embeddable container may work. JBoss Seam has support for integration testing by allowing your test to simulate JSF lifecycle events. Read here:

Author: JBoss in Action,, @javidjamae on Twitter
Jon Ferguson

Joined: Sep 05, 2007
Posts: 16
Just saw that Spring and Pitchfork allows you to use Spring to do dependency injection of resources and interceptors on EJB3 beans. That seems powerful in that you could then presumably test all this stuff outside of the server. That seems to be what Seam is providing in the way of testability, is that right?

I agree. Here's the link:
subject: JBoss' suitability for automated tests
It's not a secret anymore!