[jboss-dev] Testing Deployers Outside AS
Andrew Lee Rubinger
andrew.rubinger at redhat.com
Tue Jul 6 19:00:05 EDT 2010
I haven't made too much noise about this yet, but now that it's released:
The Arquillian testing framework, as of 1.0.0.Alpha2, has a backing
container integration for JBoss Reloaded. Carlo's originally defined
"Reloaded" as the component which brings together a minimally-running
Virutal Deployment Framework, MC, and jboss-bootstrap:
http://community.jboss.org/docs/DOC-13453
The take-home that our Arquillian adaptor provides is an ultra-slim way
to bring up MC/VDF without any explicit coding and enables testing of
bits like Deployers and other MC beans in a slim manner, outside of AS.
For instance, I check the postcondition that one of my deployers adds an
attachment to the DeploymentUnit:
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/components/async/trunk/deployer/src/test/java/org/jboss/ejb3/async/deployer/AsyncExecutorServiceDeployerTestCase.java
In this way we can precertify that our projects' VDF components are
working before they hit AS. The test above runs in under 2s.
I recommend to projects using VDF that we start to use Arquillian as
outlined above. This is also possible via manual setup, but the
Reloaded APIs are still under change/flux, and hiding behind Arquillian
to do the wiring gives you a much smaller API to manage (not to mention
that it saves you from setting up jboss-bootstrap/MC on your own).
S,
ALR
More information about the jboss-development
mailing list