Reputation: 706
Anyone got the Android uiautomator to run with multiple devices, at the same time, but doing different things?
I mean, I'd like my test to start up both devices and apps and then device A does something that device B has to react to. It seems this cannot be done with the current UiAutomatorTestRunner (which is hidden). Am I wrong?
Is my best bet to build my own TestRunner that can handle multiple devices? Tips?
Upvotes: 2
Views: 1443
Reputation: 13077
This is not possible as the UiAutomatorTestCase
subclass actually runs on the device. Writing a custom test runner will not resolve this problem.
I had a similar need and created a small proof of concept - UiMutilator
It utlizes a a workaround - It creates several small dummy-test-methods that always pass that does the automation you need, e.g. pressing a button. The corresponding method in UiMutilator, e.g. pressHome()
then invokes this dummy-test-methods. This way it can control multiple devices!
Upvotes: 1