aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss Watch "JBoss New topic
Author

JBoss' suitability for automated tests

Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

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
Author
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:

http://docs.jboss.org/ejb3/embedded/embedded.html
http://wiki.jboss.org/wiki/EmbeddedAndTomcat

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:

http://docs.jboss.com/seam/2.1.0.A1/reference/en/html/testing.html


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

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?

Cheers,
Jon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss' suitability for automated tests
 
Similar Threads
Downloaded JBoss, Now what?
HttpUnit No Web Server howto newbie question...
Run as Junit Test case
Best free EJB Container or AppServer
JBoss again...