• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss' suitability for automated tests

 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Javid Jamae
Author
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jon Ferguson
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic