Skip to content
This repository has been archived by the owner. It is now read-only.
Arquillian Extension for Google Web Toolkit
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


We don't maintain this code base anymore. If you are interested in picking it up from where we left please reach out to us through Arquillian forum.

Arquillian Google Web Toolkit Extension

The Arquillian GWT extension brings true integration testing to GWT. This means that GWT integration tests can break free and execute in the actual runtime container instead of being tied to GWT’s embedded Jetty server. Further it is possible to combine GWT client-side and standard in-container tests in the same test class. This allows to test features without having to worry about the client-server bridge and should pave the way for future support of Arquillian Warp and Drone in GWT integration tests.

Getting Started

If you're new to Arquillian take a look a the Getting Started Guide. To start using the Arquillian GWT extension just add the following dependency to your project.


Make sure this dependency is specified before all GWT dependencies (gwt-user, gwt-dev, gwt-servlet) in your pom.xml. The Arquillian GWT extension requires GWT 2.5.0 or higher.

Writing Arquillian GWT tests

To run a test method as a GWT integration test either annotate the test class or test method with @RunAsGwtClient and specifiy the GWT module. If you annotate the test class all test methods in that class will run as GWT integration tests.

public class MyTestClass {

  @RunAsGwtClient(moduleName = "org.myapp.MyGwtModule")
  public void myGwtTest() {

Here's a complete example:

public class GreeterRpcTest extends ArquillianGwtTestCase {

  public static WebArchive createDeployment() {
    return ShrinkWrap.create(WebArchive.class, "test.war")
      .addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"));

  @RunAsGwtClient(moduleName = "org.myapp.MyGwtModule")
  public void testGreetingService() {
    GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
    greetingService.greetServer("Hello!", new AsyncCallback<String>() {
      public void onFailure(Throwable caught) {"Request failure: " + caught.getMessage());

      public void onSuccess(String result) {
        assertEquals("Received invalid response from Server", "Welcome!", result);

You will only need to extend ArquillianGwtTestCase if you want to inherit GWT's asynchronous testing methods (finishTest and delayTestFinish).


You can’t perform that action at this time.