All Projects → arquillian → arquillian-extension-jrebel

arquillian / arquillian-extension-jrebel

Licence: other
The JRebel Arquillian integration lets you run your tests instantly by taking advantage of the JRebel hotdeploy

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Obsolete

We don't maintain this code base anymore, because JRebel is not available free of charge for open source projects.

If you are interested in picking it up from where we left please reach out to us through Arquillian forum.

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.

Usage

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

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

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(ServletMethodExecutor.java:126)
	at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
	at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
	...
Caused by: java.lang.IllegalStateException: Error launching request at http://127.0.0.1:8080/RebelAlreadyShippedTestCase/ArquillianServletRunner?outputMode=serializedObject&className=org.jboss.arquillian.extension.jrebel.RebelAlreadyShippedTestCase&methodName=checkRebel. No result returned
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:162)
	at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:122)
	... 77 more
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].