I have been working on an SDK that uses BTLE to communicate with other devices. We are currently exploring testing solutions to test the matrix of communication possibilities between devices. A former engineer on the project set up his own system using Avro to control multiple devices & check their output.
I am wondering if there’s a way for me to use Appium to fire up tests on multiple physical devices at once. Any thoughts on that?
Thanks again for all that you’ve done w/ Appium. I really love working with it. I am really hoping that we can make use of it for this case.
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.
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
multi device ,multi platform automation! you may automate n number of iOS and android devices at the very same time!
10 times speed achieved as compared to simple appium automation scripts!
Device reset and restart achieved
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!
Please check the below link. It provides a very basic implementation of parallel execution using Java Thread and Runnable interface. This is a very simple approach, and you would need to modify the logic if you want to hook it up with some frameworks.
@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 AKKA 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!)
Theoretically - no limitation, practically - after 6 devices we experienced problems with ADB: it starts disconnect devices, shut down, etc. Also, you need good USB hub for that thing as bad hub is a bottleneck there.
But again, one appium server - one device. so 6 devices - 6 servers.
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