This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./gradlew connectedFlavor2DebugAndroidTest \ | |
-Pandroid.testInstrumentationRunnerArguments.class=my.package.MainActivityTest#test2,my.package.MainActivityTest#test3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./gradlew connectedFlavor1DebugAndroidTest \ | |
-Pandroid.testInstrumentationRunnerArguments.class=my.package.MainActivityTest#test1,my.package.MainActivityTest#test2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.stepstone.base.test.runner.filter | |
import android.os.Bundle | |
import com.stepstone.base.BuildConfig | |
import com.stepstone.base.test.runner.annotation.TestFilter | |
import org.junit.runner.Description | |
import timber.log.Timber | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.stepstone.base.test.runner.filter | |
import org.junit.runner.Description | |
import org.junit.runner.manipulation.Filter | |
/** | |
* Helper parent class for [Filter] that allows suites to run if any child matches. | |
*/ | |
abstract class ParentFilter : Filter() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.stepstone.base.test.runner.filter | |
import android.os.Bundle | |
import com.stepstone.base.BuildConfig | |
import com.stepstone.base.test.runner.annotation.TestFilter | |
import org.junit.runner.Description | |
import timber.log.Timber | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.stepstone.base.test.runner; | |
import android.os.Bundle; | |
import android.support.test.runner.AndroidJUnitRunner; | |
import com.stepstone.base.test.runner.filter.FlavorFilter; | |
public class MyAndroidJUnitRunner extends AndroidJUnitRunner { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
defaultConfig { | |
... | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
testOptions { | |
execution 'ANDROID_TEST_ORCHESTRATOR' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb shell 'CLASSPATH=$(pm path android.support.test.services) app_process / \ | |
android.support.test.services.shellexecutor.ShellMain am instrument -w -e -v \ | |
targetInstrumentation com.foo.bar/android.support.test.runner.AndroidJUnitRunner \ | |
android.support.test.orchestrator/.AndroidTestOrchestrator' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02/26 17:18:09: Launching All Tests | |
$ adb push .../build/outputs/apk/debug/app-debug.apk /data/local/tmp/com.foo.bar | |
$ adb shell pm install -t -r "/data/local/tmp/com.foo.bar" | |
Success | |
$ adb push .../build/outputs/apk/androidTest/debug/app-debug-androidTest.apk /data/local/tmp/com.foo.bar.test | |
$ adb shell pm install -t -r "/data/local/tmp/com.foo.bar.test" | |
Success | |
$ adb push /Users/piotr/.gradle/caches/modules-2/files-2.1/com.android.support.test/orchestrator/1.0.1/12d61be26b643c6413d207248660bce8f6d8b236/orchestrator-1.0.1.apk /data/local/tmp/android.support.test.orchestrator | |
$ adb shell pm install -t -r "/data/local/tmp/android.support.test.orchestrator" | |
Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
defaultConfig { | |
... | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
... | |
} |
OlderNewer