In order to run multiple devices at the same time, you just need to put adb commands in shell script and made earlier ones run in background. In the adb command, specify device by their serial numbers. For example, create test.sh, in which you have
adb -s shell am instrument -w com.mytest.test/android.test.InstrumentationTestRunner&
adb -s shell am instrument -w com.mytest.test/android.test.InstrumentationTestRunner
The best part is that by combining this with auto build and deployment (hint: apache) , you can get fully automated test on multiple devices.
Video below shows a test suite of three very basic tests running on three devices (two physical and a simulator )at the same time.
I am using windows batch file to run m test in multiple devices. If I put & at the end of each adb command, the test running in each device one by one, but not at a time in all the devices, let me know how to do this in windows batch file.
The & will work only if your batch support background task. Windows cmd does not. If you do it in Linux or Max, this will work. On windows you can try Cygwin or Powershell. I haven’t tried this myself though, because I use Mac.
I got it, i have put “START \B” before every command
Can I see your test.sh file?
The commands are already in the blog!
I want your project with test case written , can you help me on this ?