Warp fills the void between client-side and server-side testing.


Arquillian Warp Build Status

Warp fills the void between client-side and server-side testing

This extension allows you to write client-side test which asserts server-side logic.

Warp has built-in support for following frameworks

  • Servlet API
  • JSF 2

and it has also several framework extensions



Release blogs



Getting Started

Setting up a project

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


or any framework-specific extension:


Use the servlet protocol in arquillian.xml configuration:

<defaultProtocol type="Servlet 3.0"/>

For more information on getting started, see documentation.

Writing Warp tests

To allow your test to use the Warp, place a @WarpTest annotation to the test class:

public class BasicTest {

Don't forget to force Arquillian to run the test on a client with a @RunAsClient annotation.

Using `Warp` to trigger the client action

You can use any HTTP client, such as WebDriver (driven by @Drone), to trigger the server logic:

WebDriver browser;

Then use Warp utility class to run initiate method.

public void test() {

       .initiate(new Activity() {

            public void perform() {
                browser.navigate().to(contextPath + "index.jsf");

       .inspect(new Inspection() {
            private static final long serialVersionUID = 1L;

You need to provide Activity - the contract of this interface is that its perform method leads to triggering one or more HTTP requests against contextPath URL (injected by Arquillian).

Finally, in the inspect method, you need to provide object which implements Inspection interface. This interface provides contract for object which can execute server-side logic.

Don't forget to provide serialVersionUID for Inspection objects.

Asserting server state with `Inspection`

In the Inspection implementation, you can provide test methods annotated with lifecycle-test annotations:

  • @BeforeServlet
  • @AfterServlet
  • @BeforePhase
  • @AfterPhase

Simple assertion may look like:

new Inspection() {

    private static final long serialVersionUID = 1L;

    CDIBean cdiBean;

    public void test_initial_state() {
        assertEquals("John", cdiBean.getName());

Note that you can use dependency injection to bring the classes such as CDI beans, EJB beans, or any other resource supported by Arquillian.

Learning from Tests

In order to explore more use cases for Warp, the best way is to explore functional tests: