Arquillian Drone Extension 2.3.0 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 2.3.0 release of the Arquillian Drone Extension component!

Apart from several fixes and improvements, this release brings one new feature – after quite long time, Drone provides an extension for Appium.
I’d like to thank Václav Muzikář. He’s our hero for this feature, as he implemented the whole extension!

Arquillian Drone Appium extension

This extension enables you to use the Appium project with Drone and Graphene in your functional tests for mobile devices.

This extension only provides the integration of Appium WebDrivers with Drone, i.e. it only instantiates an Appium Driver and passes DesiredCapabilities to it.
For more instructions on how to install and configure Appium server and mobile physical and/or virtual devices please refer to:
appium/appium
appium/java-client
appium.io

How to use it

1) First of all, you need to have this extension on your project’s classpath. Eg. as a Maven dependency:

<dependency>
    <groupId>org.jboss.arquillian.extension</groupId>
    <artifactId>arquillian-drone-appium-extension</artifactId>
    <version>${version.org.jboss.arquillian.drone}</version>
</dependency>

Please keep in mind that this dependency doesn’t serve as a dependency chain – you also need to add the dependencies mentioned in Drone getting started documentation

2) To use an Appium Driver you need to specify appium as a browser property:

<extension qualifier="webdriver">
    <property name="browser">appium</property>
    ...
</extension>

3) You then need to specify the Desired Capabilities for the Appium server. Some of them are required given the specific platform. E.g.:

<extension qualifier="webdriver">
    <property name="browser">appium</property>
    <property name="platformName">android</property>
    <property name="deviceName">Some Android emulator</property>
    <property name="browserName">chrome</property>
    <property name="avd">nexus</property>
</extension>

For more info please see the complete list of supported capabilities

Using remote Appium server

By default, Appium Driver starts the local Appium server by itself (or if running already), it connects to it.
To override this, you can also specify a remote address where is Appium server listening:

<extension qualifier="webdriver">
    ...
    <property name="remoteAddress">http://192.168.1.12:4723/wd/hub</property>
    ...
</extension>

ChromeOptions

In case of Android and Google Chrome browser, you can also specify ChromeOptions the same way as with the standard ChromeDriver (using the ‘chrome’ prefix). E.g.

<extension qualifier="webdriver">
        ...
        <property name="chromeArguments">--disable-translate</property>
        ...
    </extension>

Instantiation timeout

Since a mobile virtual device boot is typically performed when instantiating the driver, the instantiationTimeoutInSeconds is set to 240 seconds (instead of the default 60) by this extension.
To override this you can simply use e.g.

<extension qualifier="drone">
    <property name="instantiationTimeoutInSeconds">120</property>
</extension>

Appium Driver implementations

Different driver implementations are instantiated by this extension based on the desired platform:

You can then type cast the driver object to a specific one, e.g.:

AndroidDriver androidDriver = (AndroidDriver) driver;
androidDriver.openNotifications();

Using different Appium Java Client version

Since the Appium development is much more rapid than this extension, you can of course use a newer java-client version (and therefore newer Appium Driver) in your project.
You can e.g. just exclude the java-client dependency from this extension and use your desired version:

<dependency>
    <groupId>io.appium</groupId>
    <artifactId>java-client</artifactId>
    <version>5.0.0-BETA9</version>
</dependency>
<dependency>
    <groupId>org.jboss.arquillian.extension</groupId>
    <artifactId>arquillian-drone-appium-extension</artifactId>
    <version>${version.org.jboss.arquillian.drone}</version>
    <exclusions>
        <exclusion>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
        </exclusion>
    </exclusions>
</dependency>

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Arquillian Drone Extension
Version 2.3.0 view tag
Release date 2017-07-13
Released by Matous Jobanek
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-drone-bom pom
  • org.jboss.arquillian.extension » arquillian-drone-webdriver-depchain pom
  • org.jboss.arquillian.extension » arquillian-drone-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-configuration jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-webdriver jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-saucelabs-extension jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-browserstack-extension jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-drone-appium-extension jar javadoc pom

Release notes and resolved issues 3

Feature Request
  • ARQ-2038 - Create Drone extension for Appium
Bug
  • ARQ-2126 - Drone sets the size twice when a DroneInstanceEnhancer is used
  • ARQ-2127 - It is not possible to set window size for chromeHeadless

Thanks to the following list of contributors: Matous Jobanek, Václav Muzikář, Hemani