Arquillian Android Extension 1.0.0.Alpha2 Released

The Arquillian team is proud to announce the 1.0.0.Alpha2 release of the Arquillian Android Extension component!

Arquillian Android Extension has reached the Alpha2 milestone. This is a bugfix release with a few new nice features.

Significant changes in 1.0.0.Alpha2

Ability to specify ABI

Since Android 4 the SDK allows to define multiple ABI types for the emulator. We now honor this property and fail fast if multiple ABIs are available during creation of the emulator.

arquillian.xml
<extension qualifier=“android”>
<property name=“abi”>armeabi-v7a</property>
</extension>
Ability to inject Android Driver instance into the test

You now have limited control of the device from the test itself.

AndroidApkInstallationTestCase.java
@ArquillianResource
AndroidDevice device;
    
    @Test
public void installAndUninstallApk() throws AndroidExecutionException {
    device.installPackage(new File("src/test/apk/calculator.apk"), true);
    
        List<String> installedApps = getInstalledPackages(device);
    
        Assert.assertTrue("Calculator app was installed", installedApps.contains(CALCULATOR_APP));
    device.uninstallPackage(CALCULATOR_APP);
    
    installedApps = getInstalledPackages(device);
Assert.assertFalse(“Calculator app was uninstalled”, installedApps.contains(CALCULATOR_APP));
}

Big thanks go to Jan Papousek (@jan_papousek) for improving and testing this release!

We hope that you’ll enjoy the improvements. We look forward to hear your feedback in the community forums.

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 Android Extension
Version 1.0.0.Alpha2 view tag
Release date 2013-01-09
Released by Lukas Fryc
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-android-bom pom
  • org.jboss.arquillian.extension » arquillian-android-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-configuration jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-drone jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-depchain pom
  • org.jboss.arquillian.extension » arquillian-android-tests jar javadoc pom

Thanks to the following list of contributors: Karel Piwko, Lukas Fryc, Jan Papoušek, Aslak Knutsen

Arquillian Android Extension 1.0.0.Alpha1 Released

The Arquillian team is proud to announce the 1.0.0.Alpha1 release of the Arquillian Android Extension component!

The Arquillian Android extension allows you to use the Android SDK in your Arquillian tests. Most notably, it allows you to start an Android Virtual device or connect to a real device. A part of the Android Extension for Arquillian is the Android Drone Extension. This extension allows you to easily configure WebDriver based tests which will be executed directly in an emulator device.

When testing your application, you can then easily switch between desktop and mobile UI or develop mobile specific tests.

How to use it?

First, download the Android SDK from developer.android.com and point the ANDROID_HOME system variable to the directory where you extracted the SDK. You can then update and install specific SDK versions by running the `android` command.

Next, add Android extension to dependencies. This depchain will add both Arquillian Android and Android Drone extensions.

<dependency>
    <groupId>org.jboss.arquillian.extension</groupId>
    <artifactId>arquillian-android-depchain</artifactId>
    <version>1.0.0.Alpha1</version>
    <type>pom</type>
    <scope>test</scope>
</dependency>

Note: Make sure you do NOT have the Arquillian Drone Selenium Server on classpath, as it will collide with the Android SDK unless configured to run on a different port. If you can’t remove it from classpath, you should disable it in arquillian.xml

<extension qualifier="selenium-server">
    <!-- this must be skipped, we run /wd/hub on emulator -->
    <property name="skip">true</property>
</extension>

Download the Android Server APK to be installed to you mobile device from code.google.com. Use android-server-2.6.0.apk for devices including Android 2.3.4, latest version for Android 3.0 and newer.

Set up WebDriver in arquillian.xml

<extension qualifier="webdriver">
    <!-- this makes WebDriver connect hub on Android device -->
    <property name="remoteAddress">http://localhost:14444/wd/hub</property>
</extension>

Set up Android in arquillian.xml

<extension qualifier="android">
    <!-- this is optional, can be set via ANDROID_HOME property -->
    <property name="home">/home/kpiwko/apps/android-sdk-linux_x86</property>
    <!-- Nexus S -->
    <!-- <property name="serialId">3233E8EDB21700EC</property>-->

    <property name="verbose">true</property>
    <property name="apiLevel">13</property>
    <property name="avdName">SnapshotEnabled</property>
    <property name="emulatorBootupTimeoutInSeconds">180</property>
</extension>

Properties explained, required in bold:

  • home – Android SDK home, can be ommited if set via ANDROID_HOME property
  • avdName – name of the Android Virtual Device. It will be either created or reused
  • apiLevel – (10) denotates API level, use android list target to get more variants
  • serialId – replaces avdName if set and available, represents a real device. Use adb devices to get the list
  • skip – (false) skip execution
  • verbose – (false) be verbose
  • force – (false) force emulator recreationg
  • sdSize – (128M) SD card size for emulator
  • emulatorBootupTimeoutInSeconds – (180) maximal time to get emulator started, use Snapshot enabled device if it takes too long
  • emulatorOptions – emulator options

Emulators are created by default in ${basedir}/${avdName}.

Set up Android Drone in arquillian.xml

<extension qualifier="android-drone">
    <property name="androidServerApk">android-server-2.16.apk</property>
</extension>

Properties explained, required in bold:

  • androidServerApk – path to the Android Server APK you’ve downloaded
  • skip – (false) skip execution
  • verbose – (false) be verbose
  • webdriverPortHost – (14444) port on Host connected with port on device
  • webdriverPortGuest – (8080) port on Guest connected with port on Host

Big thanks go to Jan Papousek (@jan_papousek) for improving and testing this release!

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 Android Extension
Version 1.0.0.Alpha1 view tag
Release date 2012-02-29
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-android-bom pom
  • org.jboss.arquillian.extension » arquillian-android-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-configuration jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-spi jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-drone jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-android-depchain pom
  • org.jboss.arquillian.extension » arquillian-android-tests jar javadoc pom

Release notes and resolved issues 0

Initial Support for Android via Drone WebDriver

Thanks to the following list of contributors: Karel Piwko, Aslak Knutsen, Jan Papoušek