Can we resume testing exactly from where it crashed?

Hi,

Let’s say that the test has been running from 1 hour and suddenly the script crashes. So Is there any way to restart the script without restarting the whole app?

Let me explain further, I was scrolling down on Instagram app and it worked fine for 1 hour but then it crashed, Now I would like to restart the test again without having to restart the Instagram app.

Another question, Can you help me locate error? It says:

Exception in thread “main” org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:48’
System info: host: ‘WIN-198G9P47MC8’, ip: ‘169.254.65.232’, os.name: ‘Windows Server 2012 R2’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0_241’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {appActivity: com.instagram.mainactivity…, appPackage: com.instagram.android, databaseEnabled: false, desired: {appActivity: com.instagram.mainactivity…, appPackage: com.instagram.android, deviceName: Nexus5, fullReset: false, newCommandTimeout: 25, noReset: true, platformName: android, resetKeyboard: true, udid: emulator-5556, unicodeKeyboard: true}, deviceApiLevel: 29, deviceManufacturer: Google, deviceModel: sdk_gphone_x86, deviceName: emulator-5556, deviceScreenDensity: 480, deviceScreenSize: 1080x1920, deviceUDID: emulator-5556, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 25, noReset: true, pixelRatio: 3, platform: LINUX, platformName: Android, platformVersion: 10, resetKeyboard: true, statBarHeight: 72, takesScreenshot: true, udid: emulator-5556, unicodeKeyboard: true, viewportRect: {height: 1704, left: 0, top: 72, width: 1080}, warnings: {}, webStorageEnabled: false}
Session ID: 9b5dc25a-2783-4a6d-ae9e-ef6d4cc8f90a
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:41)
at io.appium.java_client.TouchAction.perform(TouchAction.java:187)
at instagram_scraper.boggy.scroll(boggy.java:567)
at instagram_scraper.boggy.Instagram_users_followers(boggy.java:211)
at instagram_scraper.engine.main(engine.java:50)

Kind Regards

You don’t give much information about your setup, so I’ll keep this generic. I see you are running Java, so I’ll talk about a Java testing framework.

Appium is just the interface to the device/emulator/simulator. If you want to control your tests, you need a testing framework. One popular one is TestNg. With TestNg you can do things like rerun failing test cases:

If you have cascading failures the above would be a great help. I encourage you to read up on TestNg and other testing frameworks about this and other capabilities.

Hi Wreed, Thanks for your response.

I have heard alot about this TestNg, I think now it’s the right time to start with it.

Thanks for the motivation