How to execute appium tests on two sibling VMs running on a same host?

If a group of unique appium tests were executed only in either of sibling VM, then tests runs successfully.

If the same group of unique appium tests were exected in both the sibling VMs simultaneosuly, then tests fails with either of below errors:

Also, Appium server is running independently in each sibling VM.


  1. org.selenium.WebdriverException: An unknown server-side error occurred while processing the command
  2. Connection refused error

VMs are installed with:

  • Appium and its prerquistes
  • intel HAXM
  • Android emulators/iOS simulators

I think you need to start the appium server in different machine or in different port

For #1, Assuming that you are suggesting to run appium in different machine means that run a appium server in a VM other than sibling VMs. If that said, then this is not a feasible and not resource friendly solution since this requires separate VM instance apart from sibling VMs for each run.

In simple words, say 2 sibling VMs are used to run appium tests, then we need a total of 3 VMs for each run [i.e. 2 sibling VMs + 1 VM for running appium server]. This increases totally resources overhead while running appium tests in bulk mode with multiple hosts.

For #2, actually appium server is port is unique in both the sibling VMs.

@latchookarthi Please correct me if you meant something else.

I want to understand why appium is failing even though appium servers are running in two distinct sibling VMs running in a same host.

I was facing the similar issue when am trying to run my scripts in parallel in multiple devices… I was able to launch the app but when I mention to perform the actions I was getting connection refused error . the solution I found was to run the server in different port and bp … not sure if this helps