Arquillian Drone Extension
Java JavaScript
Pull request Compare This branch is 54 commits behind arquillian:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Arquillian Drone Build Status

The Arquillian Drone provides a simple way how to write functional tests for an application with a web-based user interface. Arquillian Drone brings the power of WebDriver into the Arquillian framework. WebDriver provides a language how to communicate with a browser, like filling the forms, navigating on the pages and validating their content.

Why should I use Arquillian Drone instead of plain WebDriver?

There are many reasons why you want to do that, the most important being:

  • Life cycle management of the browser

  • Interaction with deployments and containers provided by Arquillian

  • Simple usage of multiple browsers in a single test

  • Configuration kept on a single place, outside of the Java code

  • Fully compatible with the IDE

  • Integration with mobile based browsers testing (Arquillian Droidium)

  • Integration of JavaScript test suite execution (Arquillian QUnit)

  • Compatible with WebDriver (Selenium 2), Selenium 1 and Selenium Grids

If you are still not convinced that Arquillian Drone matches your needs, you might have a look at Arquillian Graphene 2, which is a wrapper on top of WebDriver, goes one step further and provides you a convenient way how to write tests for rich AJAX UIs with an ease, injections for Page Objects and Page Fragments and much more.

Getting Started

The following example illustrates how Arquillian Drone can be used with WebDriver:

public class WebDriverTest {

    static final String USERNAME = "demo";
    static final String PASSWORD = "demo";

    URL contextPath;

    WebDriver driver;

     * Creates a testing WAR application
     * @return WebArchive to be tested
    @Deployment(testable = false)
    public static WebArchive createDeployment() {
        return Deployments.createDeployment();

    public void login() {
        LoginPage page = new LoginPage(driver, contextPath);
        page.login(USERNAME, PASSWORD);

    public void logout() {
        LoginPage page = new LoginPage(driver, contextPath);

You need to put following configuration to the pom.xml file of your project:

        <!-- Arquillian Core dependencies -->
        <!-- Arquillian Drone dependencies and WebDriver/Selenium dependencies -->

    <!-- To use Arquillian Graphene (2) -->
You can use graphene-webdriver dependency chain even if you are willing to use plain WebDriver. Graphene will just bring you more goodies but it does not force you to change a single line of your code

Comprehensive Drone documentation can be found at

Building the project


  • JDK 6 and newer

  • Maven 3.0.3 and newer

Running test suite

You can use Arquillian Spacelift to gather all the required binaries. Just run:

./gradlew test

This will run tests using multiple Arquillian Core versions and phantomjs browser. In case you want to modify the behavior, you can specify -ParquillianCoreVersions=1.1.4 and -Pbrowser=phantomjs,firefox for instance. This will run integration test using a cross product of Arquillian Core and browsers defined.

Running testsuite this way will modify all pom.xml files in the project. Make sure you have committed all your changes there first.

Manual way to run test suite


  • running Selenium Server at port 4444, with paths to binaries required for remote browser execution

  • installed web browsers you want to test

  • you might want to align your layout to be the same as paths to binaries specified within arquillian.xml in drone-webdriver module. Alternatively, you can override properties with -Darq.extension.${extensionQualifier}.${propertyName}

In order to start Selenium Server, execute:

java -jar selenium-server-standalone-2.43.1.jar -Dphantomjs.binary.path=/path/to/phantomjs.binary

Once Selenium Server is running, you can run the tests by:

mvn clean verify -Dbrowser=${browser}

Where browser has the same value as browser property from arquillian.xml you want to tests (e.g. firefox, chrome, phantomjs, internetExplorer, opera, etc.)

VNC server instance can be used to let all the browsers pop out in separate display. Just prepend both commands with DISPLAY=:${display.number}

Releasing new version

Run following commands:

mvn clean release:prepare release:perform

Make sure that you push the tag, close all issues with given version in JIRA and mark version as released.