Hey,
You should setup one appium server per each device.
Here is a full explanation: http://stackoverflow.com/questions/18719755/multi-devices-support-in-android6.5k
Thank You so much for the reply. This thread was very informative : https://github.com/appium/appium/issues/4622.2k
It sounds like you can spawn multiple Appium servers on different ports connected to different devices, then have multiple capabilities in our test scripts for each device.
If I want multiple test commands running on various devices at once, I can just multi-thread them. Sounds plausible.
Thanks for the heads up!
@vfxdrummer do you know if the same is possible for iOS devices or is it Android only?
Thanks
If you want to run automation for Android and iOS at once. Do the below setup.
Just run ur appium.js with different different address and port.
node appium.js -a 127.0.0.1 -p 8080
And
node appium.js -a 0.0.0.0 -p 4723
Set the same Address and Port in your Test Automation Script as well. And it is Done.
hello guys,
i finally achieved multi device high speed automation.
I used self developed automation server and UIAutomator handles for android and xctest handles for iOS inside device! I must say it is awesome! you may automate your device from anywhere just connect to automation server from your device!
Features achieved for iOS and Android
1. multi device ,multi platform automation! you may automate n number of iOS and android devices at the very same time!
2. 10 times speed achieved as compared to simple appium automation scripts!
3. Device reset and restart achieved
4. Intra-device(swarm) test case for multi device test cases! e.g. trading application (test includes multiple users at same time!)
Right now I am working on making this Architecture generic to use on any project and I am working on making P2P architecture.Currently it is server client architecture!
tell me if anyone need any help!
refer my reply I achieved this!
@Raj_Kumar YOU CAN AUTOMATE ONE DEVICE WITH ONE SERVER OF APPIUM.
@nagendaredi If you want multiple device you need to start multiple appium servers with different PORTS and you need to create multiple clients(java threads) to support that each of the server!
I would used AKKA69 library to achieve this over java multithreading. you can even communicate between threads very easily and synchronize multiple test runs for even inter-device (swarm)test runs!(i.e. Device1 you do something and see its effect on Device 2!)
Hi All,
Tried configuring multiple android devices getting following error message:-
org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 12; The content of elements must consist of well-formed character data or markup.
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:109)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 12; The content of elements must consist of well-formed character data or markup.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.testng.xml.XMLParser.parse(XMLParser.java:39)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
at org.testng.xml.Parser.parse(Parser.java:170)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:305)
... 3 more