Arquillian gets even quicker!

JRebel meets JBoss - Arquillian gets testing turbo boost

It's always great to see fresh exciting new projects crossing over into each others yards to progress the standards. The latest link-up between ZeroTurnaround and JBoss promises to help us all out - with a new JRebel extension announced for the integration testing suite Arquillian.

Since getting its first major version a few weeks ago, JBoss Arquillian continues to go from strength to strength with this new extension making it possible to avoid restarts and redeploys. The ties between ZeroTurnaround and JBoss have always been strong - with the Estonian company already supporting the JBoss Forge team with free JRebel OSS licenses, so this relationship was a no-brainer with the Arquillian guys seeking to cut redeploys in development from the start.

Bernard Labno writes:

Writing tests with Arquillian is so cool. Our tests are run in container, we can inject various artifacts like EJBs, JMS queues, CDI beans and more into our tests.
But the turnaround for big deployments is too big. Even for smaller ones, if you for example use Seam3 or Hibernate it takes some seconds to redeploy. And those seconds add up.

Together Labno and Aslak Knutsen have demonstrated the JRebel extension for Arquillian to reload changed artifacts.

Simply add impl module to classpath and run test either from the IDE or Maven

<dependency>
    <groupId>org.jboss.arquillian.</groupId>
    <artifactId>arquillian-jrebel-impl</artifactId>
    <version>1.0.0.Alpha1-SNAPSHOT</version>
</dependency>

Of course, making sure to use servlet protocol. To do this, add the following to arquillian.xml:

<defaultProtocol type="Servlet 3.0"/>

It's as simple as that. With this new extension, tests are deployed only at the first execution, and for the repetitive runs JRebel takes the reins and updates the test and application code in the running container.

Labno revealed that they had managed to get EAR and WAR deployments working 'on the fly', with EJB support next on the list.

Arquillian has certainly simplified the integration testing experience for many already, but now with the possibility to massive reduce the amount of redeployments, it can truly make its ascent towards becoming the people's choice for integration testing.

If you want to get your hands on this brainy add-on for Arquillian, check out the GitHub source code. Once again, congratulations to both projects for coming together for the cause - it's bound to help out many an Arquillian developer!

Chris Mayer

What do you think?

JAX Magazine - 2014 - 03 Exclucively for iPad users JAX Magazine on Android

Comments

Latest opinions