/arquillian-extension-drone

Arquillian Drone provides a simple way to write functional tests for web apps. Drone brings the power of WebDriver into the Arquillian, and the power of Arquillian to WebDriver.

Primary LanguageJava

Arquillian Drone Build Status

To read complete documentation visit http://arquillian.org/arquillian-extension-drone/

The Arquillian Drone 2 extension for Arquillian provides a simple way to include functional tests for an application with a web-based user interface.

Arquillian Drone 2 brings the power of WebDriver into the Arquillian framework. WebDriver serves as a language to communicate with the browser, by filling the forms, navigating the pages and validating their content.

Compared with its predecessor Arquillian Drone 1, it offers new features and tools as part of the SPI as well as multiple life cycle scopes of @Drone points as part of the API.

1. 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) 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.

2. Building the project

Prerequisites:

  • JDK 8 and newer

  • Maven 3.0.3 and newer

2.1. Running test suite

To run only unit tests:

mvn clean test

To run the whole test suite including functional tests using chrome browser.

mvn clean verify -Dbrowser=chrome

In case you want to modify the browser, you can specify -Dbrowser=firefox for instance. This will run the test suite using firefox defined. Similarly, you can use Chrome, Safari, etc…​

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

2.2. 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.