Hi,
I am currently doing some research how to run parallel tests on both Android and IOS devices. I have done some reading on the Appium website and various posts that its possible to run parallel tests on Android devices but not IOS.
I managed to launch my tests running parallel on 2 Android devices by starting 2 Appium instances on different ports using the following commands:
My question is, is it possible to spin up another Appium instance on eg : port 4723, running tests on an IOS device/simulator, in parallel with the above two Appium instances? (port 4727 and 4725)
You can either use the selenium grid and for that you have plenty of links to follow or you can do your own implementation, in this last you need to launch n appium servers in different ports and connect the devices in proper server.
Unless you have another goal it is simple. Please tell us what you want to accomplish if it doesn’t fit the above options.
@Telmo_Cardoso Thanks you for your reply. Again I will look in to the selenium grid and I will follow up the things. I have one clarification over here.
1.In Apppium can I run two applications in the same port. (I have tried but it says Port is in use.)
2.In Appium I can run the application in two different ports. But every time I need to hard code the port number like 4725, 4724. Is there any way to find the available port numbers in appium and also what is the range of port number. I mean from where it starts and where it ends. Example(4700-4800).
No. Not in appium or anything else. If you are using one port with one protocol it wont allow you to use it again while first application doesn’t kill connection.
Any port available in computer will do. The first 1024 are reserved ports, but from those and above go crazy until 65535. Off course you should avoid the most common ones like 8080 or 8443, etc.
Instead of giving the port number like "address":“127.0.0.1”,“port”:4725
Because in this actually after IP address/local host we are initializing the PORT NUMBER.
Is there any way to fetch the available ports automatically instead of writing as 4725 or etc., whatever.
There are thousands of available ports. You select the ones you want in order to start appium server on those and then when instantiating the drivers user proper ports previously selected.
Don’t search for problems where they aren’t You will face enough problems in the rest!
Android Multiple device testing using Appium both Android and IOS(only one IOS device), is possible with real devices, I have tested please check the below link.
Programmatically or directly in bash/cmd you just need to launch server with different port like
appium -p 4730
If you talking about the tests, you can use the grid or you build your code where you can store multiple drivers that you instantiate, one for each server/device with different capabilities (android vs ios)