问题
I have written one script which ran on single device. Now, I want to run the same script on multiple devices, by googling i come to know that we can do by creating multiple instances of appium server.
How to create multiple instances of appium server through command line?
Can anyone provide steps to start with?
Please suggest.
BR, Sagar Varpe
回答1:
Just open multiple terminals and change the port and bootstrap port on each terminal. Like this:
Terminal 1 - appium -p 4722 -bp 5422
Terminal 2 - appium -p 4723 -bp 5423
Terminal 3 - appium -p 4724 -bp 5424
and so on.
回答2:
install appium using npm in global location.
npm install -g appium
Then in two three terminal windows, type
appium -p <port1> -U <device name> -bp <bpPort1>
appium -p <port2> -U <device name> -bp <bpPort2>
To get the device name , type adb devices. Appium port - port1, port2 etc should be different and have difference of atleast 10. Same goes to bootstrap port bpPort1, bpPort2 in above command. Device name is the different device that you want to connect to. Appium requires one server per one device.
If you are using selendriod then you have to add selendriod port as well(--selendriod-port
If you require to run the nodejs server that appium GUI client starts on clicking start button, then you have to start just the node server from command line like as below
node . -p <port1> -U <device name> -bp <bpPort1>
来源:https://stackoverflow.com/questions/31827751/what-are-the-steps-to-start-appium-servers-for-multiple-devices-through-command