webdriverio/appium-boilerplate

Run tests parallel on different devices

rajivnw opened this issue · 3 comments

Let say I have 2 emulators emulator-5554 and emulator-5556,
And I have 4 features files and each feature file have 3 scenarios. So total test are 12.

I would like to run 2 different test cases or 2 different feature files in parallel on each devices. So probably 6 test cases or 2 features file will run on each device (may be different if execution time is more or less).

Currently, when I am running by adding 2 capabilities in config.capabilities [], All the test are running on each device i.e. all 12 test cases run on emulator-5554 and same 12 test cases run on second emulator-5556.

I tried specs like - specs :["./tests/*feature"] or specs :[["./tests/*feature"]].
But still all test run on each device.

Please suggest How we can run one test on any available devices instead of all on each devices?

I would recommend to use a Selenium Grid and attach Appium as a Node to the grid. Then you can have one endpoint (the Selenium Grid) with multiple Appium instance registered to it for WebdriverIO to use. Check out the docs in Appium or Selenium how to get this set-up.

Another option would be to start two Appium instances on different ports and point every capability to a different instance using the port option in the capabilities.

thanks @christian-bromann for you quick response!!
I got your point.

One quick question - If I have a cloud e.g. Kobiton where multiple devices are available. Is there way to use multiple devices for the purpose I mentioned above?

Is there way to use multiple devices for the purpose I mentioned above?

Please check out the WebdriverIO docs on organising test suites. You can set up parallelism very flexible.