Question
I have search many forums, read many post but I have not found one that has successfully run parallel test scripts in multiple Android devices or emulator. > Is this is possible? (I think it should be so far I cannot find a solution)
What I have done so far
1- I have tried: running parallel test scripts (using Testng) by creating two instances of appium server each with different port, udid, and bootport. I setup the capabilities to match the corresponding instance and it does get executed but NOT parallel.
RESULTS:
The test fails because of the following two reason: I notice that reason 1 only happens once when I fresh start the appium instances, the remainder of time fails on reason 2.
ā1 - First it fails because one of the two appium instance will throw the following error:
info: Starting App
info: [debug] Attempting to kill all āuiautomatorā processes
info: [debug] Getting all processes with āuiautomatorā
info: [debug] executing cmd: /Applications/adt-bundle-mac-x86_64-20140624/sdk/platform-tools/adb -s 9a588123 shell āps āuiautomatorāā
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: /Applications/adt-bundle-mac-x86_64-20140624/sdk/platform-tools/adb -s 9a588123 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading jsonā¦
info: [debug] Waking up device if itās not alive
info: [debug] Pushing command to appium work queue: [āwakeā,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
> error: Unhandled error: Error: read ECONNRESET
at errnoException (net.js:905:11)
at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {ādesiredCapabilitiesā:{āappActivityā:ācom.core.android.activities.MainActivityā,āappPackageā:ācom.core.androidā,āplatformVersionā:ā4.4ā,āappWaitPackageā:"com.core.]
2- Second, only one test will gets executed (sometimes in device A or sometimes in device B) in one appium instance and the second instance just halts. Sometimes device A will start running for a few seconds and once device B starts it will halt device A or vise versa.
2- I have tried: running appium in Selenium Grid node; I am able to register two distinct appium server node in Grid hub, but once I again I CANNOT get it to run parallel
RESULT:
The reason it fails is the same as previous reasons, either one Appium instance will halt while the other runs or sometimes even throws a new error that I cannot reproduce. One thing for sure Appium is very unstable trying to run two devices at the same time.
3. What else I have tried:
I have tried using different devices (nexus, samsung, amazon, LG, motorola ā¦). run locally and remotely. I just CANNOT get it to work.
What I need
Your help. Can some one respond if only you have successfully run parallel scripts on multiple devices. Can this be done??