Contributions to this website and the Android Testing Support Library are welcome and appreciated!

Contributing to this website

To contribute to this website, feel free to create pull requests for small fixes. For bigger contributions we recommend to start an issue on the ATSL issue tracker first.

Contributing to the Android Testing Support Library

Contributions to the Android Testing Support Library are very important to us. They are a great way for you to work on an actual Android product and have an impact on tens of thousands of Android applications. Contributions will usually be available in the next ATSL release.

One time setup

Getting the latest source (Command Line)

If you haven’t done so already create a working directory:

  mkdir android-support-test; cd android-support-test

Checkout android-support-test branch:

  repo init -u https://android.googlesource.com/platform/manifest -b android-support-test

Synchronize the files for all available projects:

  repo sync -j8

Source locations:

frameworks/testing/runner
frameworks/testing/rules
frameworks/testing/espresso
frameworks/uiautomator

Building and Testing

In Android Studio go to File -> Open… and select the build.gradle file located in the root folder:

  ~/android-support-test/build.gradle

At this point all Android Test Support Library projects should be loaded into Android Studio. You should be able to build and run the tests as you would run in your app. More details can be found here

Via Command Line:

From the root directory:

  ~/android-support-test/

Build debug build type for all projects:

  ./gradlew assembleDebug

Run tests for all projects:

  ./gradlew connectedAndroidTest

Note: When running connectedAndroidTest you might get an “Unable to locate adb” error. To run your tests you need to add the following line to your local.properties file:

Run tests for all projects:

  sdk.dir=/path/to/sdk/dir

You can also build, test or execute any Gradle task for a specific project by prepending the project name in front of the desired task. For instance:

./gradlew runner:connectedAndroidTest
./gradlew rules:connectedAndroidTest
./gradlew espresso:connectedAndroidTest
./gradlew uiautomator-v18:connectedAndroidTest

For a list of available Gradle commands type:

  ./gradlew tasks

Contributing your work

Read the following instructions on how to contribute to an open source project:

We are looking forward to all of your contributions!