Running Appium Tests on Multiple Devices Concurrently

Liz Pantalone
2 min readJun 3, 2019

--

source: https://icdn4.digitaltrends.com/image/mobile-phones-2-625x342.jpg

The dream of every QA is to run automated tests on a bunch of devices at once. Yes, it saves time. But really, it looks really freakin’ cool to have them all light up and start going through E2E flows all together. It’s like a bunch of ghosts are using your app!

And really, once you get Appium up and running, it’s not hard to make multiple devices all work, while running only one test command.

The answer lies in your Desired Capabilities within your wdio.conf.js file:

maxInstances: 3,capabilities: [
{
platformName: 'Android',
app: 'path/to/your/app.apk',
appPackage: 'your.app.package',
appActivity: 'MainActivity',
platformVersion: '8.0',
deviceName: 'Pixel',
},
{
platformName: 'Android',
app: 'path/to/your/app.apk',
appPackage: 'your.app.package',
appActivity: 'MainActivity',
platformVersion: '9.0',
deviceName: 'Pixel 2',
},

{
platformName: 'Android',
app: 'path/to/your/app.apk',
appPackage: 'your.app.package',
appActivity: 'MainActivity',
platformVersion: '8.0',
deviceName: 'Galaxy S',
},
],

You’re literally using an array to run these tests on an array of devices. Note that the number of maxInstances must equal the number of capabilities sets within your array.

And that’s it! You won’t need to run any extra server instances or anything. Just make sure your devices are all plugged in and receiving the command.

Check out my other articles about Appium:

--

--