I have an app with 50 espresso tests. On 10th test, app crashes and rest of the tests wont execute. Is there a way we can restart app and execution start from the next test?
You could run your tests using the Android Test Orchestrator, add the below into your build.gradle. Android Test Orchestrator allows you to continue running tests after crash.
More info here https://developer.android.com/training/testing/junit-runner
android.defaultConfig {
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' testInstrumentationRunnerArguments clearPackageData: 'true'
}
android.testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
dependency: androidTestUtil 'com.android.support.test:orchestrator:1.0.2'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With