Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (43 sloc) 3.22 KB

JRebel - The Arquillian Experience

This extension is for speeding up test development cycle. It deploys the package only once and then leverages JRebel to hot deploy changed files.


Just add impl module to classpath and run test either from IDE or maven.


Make sure you use servlet protocol! To do that add following to arquillian.xml:

<defaultProtocol type="Servlet 3.0"/>

First time you run test it will deploy the package, export the deployment to target/jrebel-temp directory and attach auto generated rebel.xml file that instructs JRebel to override deployed package with the one exported to target/jrebel-temp. Next time you run the test Arquillian will check if package exists in the temp directory and if so it will run tests without deploying the package.

If you want to force Arquillian to deploy the package again to the container you have to delete the target/jrebel-temp directory.

I'm getting exceptions

If you happen to get exception like the one below you probably do not have deployment on the server and do have metadata in target/jrebel-temp. Just remove that directory and re-run your tests.

java.lang.IllegalStateException: Error launching test org.jboss.arquillian.extension.jrebel.RebelAlreadyShippedTestCase public void org.jboss.arquillian.extension.jrebel.RebelAlreadyShippedTestCase.checkRebel() throws java.lang.Exception
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(
	at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(
	at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(
Caused by: java.lang.IllegalStateException: Error launching request at No result returned
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(
	... 77 more