我希望能够同时在两个设备上运行Android Robotium测试。目前我还没有找到任何解决方案...
更准确地说,我有一个包含多个测试类的应用程序-test.apk。我想在两个设备上运行相同的测试apk,但是不同的测试类。我知道只能使用adb以串行模式运行测试。
adb devices
你看到了
List of devices attached
SERIALOFDEVICE1 device1
SERIALOFDEVICE2 device2
然后使用显示的串口号,您可以运行命令:
adb -s SERIALOFDEVICE1 shell am instrument -w -e class com.android.foo.FooTest1 com.android.foo/android.test.InstrumentationTestRunner
adb -s SERIALOFDEVICE2 shell am instrument -w -e class com.android.foo.FooTest2 com.android.foo/android.test.InstrumentationTestRunner
位置
com.android.foo.FooTest1
com.android.foo.FooTest2
这些类是您希望在每个设备上运行的。