This shows a simple project with Android Espresso Tests
/app
- with ActivityInstrumentationTestCase2 tests that use Espresso
Tests can be ran using the following:
./gradlew connectedAndroidTest
There is an explanatory blog post here: http://blog.blundell-apps.com/android-gradle-app-with-espresso-instrumentation-tests/