Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way espresso tests will continue from the next test on app/process crash?

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?

like image 864
WorkingSmile Avatar asked Nov 08 '22 12:11

WorkingSmile


1 Answers

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'

like image 77
Amrinder Singh Avatar answered Nov 14 '22 22:11

Amrinder Singh