Arquillian Android Extensions
Java Scala
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Arquillian Droidium - ftesting of Android done right

This is the home of the following extensions for Arquillian testing platform:

Arquillian Droidium container

Implementation of Arquillian container abstraction for Android devices. By this Arquillian container adapter, you can execute tests dealing with Android devices where Android device is considered to be just another Arquillian container.

Arquillian Droidium platform

This tiny extension provides core Android platform configuration on which Droidium container depends.

Arquillian Droidium Native

Extension for supporting testing of native applications for Droidium container. You need this extension when you want to functionally test your native Android application. Native extension relies on Selendroid project from where it takes Selendroid server APK.

Arquillian Droidium Recorder

By this extension, you can make videos of Android devices while you are executing tests.

Arquillian Droidium Screenshooter

By this extension, you can take screenshots of Android devices while you are executing tests.


You are welcome to look at intensive test scenarios in tests directory in this repository where every possible scenario Droidium is able to do is shown with fully runnable examples.
public class AndroidContainerTest {

    // injected abstraction of your Android device
    AndroidDevice android;

    // APK will be deployed to android device
    // upon Android container startup
    public static Archive<?> createAndroidDeployment() {
        return ShrinkWrap.createFromZipFile(
            JavaArchive.class, new File(my.apk));

    public void test01() {
        assertTrue(android != null);

        String sn = android.getSerialNumber();
        String avdName = android.getAvdName();


        boolean emulator = android.isEmulator();

        // command and package management
        android.executeShellCommand("execute on android");
        android.isPackageInstalled("package name");

        // taking screenshots and record videos
        Screenshot screenshot = android.getScreenshot();

        android.startRecording(remoteFilePath, options);
        Video video = android.stopRecording(localFilePath);

        // push, pull and remove file to and from device
        android.push(localFilePath, remoteFilePath);
        android.pull(remoteFilePath, localFilePath);

Complete information how to use Android container can be found here.

public class NativeAndroidTestCase {

    AndroidDriver mobile;

    @Instrumentable // instruments APK by Selendroid server
    public static Archive<?> getDeployment() {
        return ShrinkWrap.createFromZipFile(JavaArchive.class,
            new File("my.apk"));

    public void test() {
public class MultipleContainersTest {

    AndroidDriver mobile_1;

    AndroidDriver mobile_2;

    @Instrumentable // instruments APK by Selendroid server
    public static Archive<?> getDeployment_1() {
        return ShrinkWrap.createFromZipFile(JavaArchive.class,
            new File("my_first.apk"));

    @Instrumentable(port = 8081) // instruments APK by Selendroid server
    public static Archive<?> getDeployment_2() {
        return ShrinkWrap.createFromZipFile(JavaArchive.class,
            new File("my_second.apk"));

    public void test() {

    public void test_2() {

In your arquillian.xml, you just specify two containers and two Drones.

    <group qualifier="containers" default="true">
        <container qualifier="android_1" default="true">
                <property name="avdName">my_first_avd</property>
        <container qualifier="android_2">
                <property name="avdName">my_second_avd</property>

    <extension qualifier="webdriver-firstapp">
        <property name="browser">android</property>
        <property name="remoteAddress">http://localhost:8080/wd/hub</property>

    <extension qualifier="webdriver-secondapp">
        <property name="browser">android</property>
        <property name="remoteAddress">http://localhost:8081/wd/hub</property>

Lastly you have to create two annotations - FirstApp and SecondApp. You find information how to create them here

What we done in the example above is that you deploy my_first.apk to my_first_avd, my_second.apk to my_second_avd, and you have two Drones hence you control my_first.apk by Drone annotated with FirstApp and you control the second app by SecondApp Drone. Class scoped Drones can be used in one test method together. Note that in case you do these Drones class scoped, Selendroids are deployed only once for the whole test case. However in case you inject them as method scoped, underlying Selendroid server would be deployed and undeployed every test method hence performance-wise it would be little bit slower.

Complete information how to use Android Native plugin for ftesting can be found here.

Arquillian Recorder integration

This extension builds on top of Arquillian Recorder so by using above recorder and screenshooter extensions, these resources will appear in resulting exporter report in e.g. html file.

Cordova tests

Droidium can run Cordova tests as well. Droidium is able to test everything Selendroid is able to test since it is based on it.

Runtime dependencies

You have to have installed Android SDK locally on your machine and you have to set it up fully.

Be sure you set all environment properties like ANDROID_HOME and ANDROID_SDK_HOME+m +JAVA_HOME and HOME.

You have to have Java installed locally as well. Droidium is developed against Java 1.6.

Example projects

Example project which show various usecases of Droidium are the part of this project and can be found here:

You can generate your own project via archetypes. They can be found here

How to install Arquillian Droidium?

mvn clean install

How to use Android container native application testing?

Please find respective README and configuration documentation in its respective directory. You can find archetypes for native testing in archetype directory so you can boostrap your testing process significantly faster. You can also take a look into tests directory. There is bunch of example projects how to use it with very deep documentation.

How to generate Javadoc?

mvn javadoc:aggregate

JIRA & Issue tracker

You are welcome to raise your issues at JBoss JIRA for Droidium component: