BrightcoveOS/android-player-samples — pull request #48 by pajatopmr (2014-06-23 02:45:12+00:00)
Title: Add support for the Android **uiautomator** feature.

## Rationale:

Since nearly all Android applications are heavily based on UI interactions, it only makes sense that UI based, whitebox testing will be a primary vehicle for ensuring quality apps. This commit introduces UI based, whitebox testing for the Brightcove player samples for Android. The tests are layered on the [well documented Google Android **uiautomator** tool](http://developer.android.com/tools/help/uiautomator/index.html).

The **uiautomator** facility is one of the last remaining pieces of the Google Android tools yet to be upgraded to use Gradle and Android Studio. It is still heavily based on *Ant* and *adb*.

For a demo run of the **uiautomator** and to understand the fundamentals, read the **UiAutomatorTest.java** file and run the helper script from the BasicOnceUxSampleApp folders using:

$ cd BasicOnceUXSampleApp && src/scripts/uiTest.sh

to see the output produced.

It is expected that over the next six months, the **uiautomator** will be integrated with *Gradle* and *Android Studio*.

## Changed files:

build.xml
* The basic *Ant* build file used to build and deply UI test case classes.

project.properties
* An *Ant* property file that provides device and file layout configuration properties.

src/androidTest/java/com/brightcove/player/samples/onceux/basic/test/UiAutomatorTest.java
* A demo UI test case providing very, very basic example usage.

src/scripts/uiTest.sh
* A helper script supporting UI testing build and deploy operations using *Ant* and *adb*.

src/androidTest/java/com/brightcove/player/samples/onceux/basic/test/MainActivityTest.java
src/androidTest/java/com/brightcove/player/samples/onceux/basic/test/NoPlayTest.java
* These instrumentation (black box) tests have been moved to the ANP project.