use androidx test orchestrator

This commit is contained in:
David Luhmer 2019-04-08 11:35:23 -03:00
parent b37f99200d
commit b2f1f909ae

View file

@ -18,9 +18,19 @@ android {
//testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "de.luhmer.owncloudnewsreader.CustomTestRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
vectorDrawables.useSupportLibrary = true
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
@ -218,6 +228,9 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.1'
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.1'
// https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator
androidTestUtil 'androidx.test:orchestrator:1.1.1'
// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK