We could Test/Run the APK in multiple devices in the combination of Emulators and Physical devices using the Spoon from Github. Android’s ever-expanding ecosystem of devices creates a unique challenge to testing applications.
Spoon aims to simplify this task by distributing instrumentation test execution and displaying the results in a meaningful way. Instead of attempting to be a new form of testing, Spoon makes existing instrumentation tests more useful. Using the application APK and instrumentation APK, Spoon runs the tests on multiple devices simultaneously. Once all tests have completed, a static HTML summary is generated with detailed information about each device and test.
We have used the Robotium(Open Source) instrumentation testing framework to automate the android mobile application and tried to run the target apk(released by dev team) and test apk generated by Robotium framework integrated with Java(Eclipse IDE) in the spoon.
How to use Spoon?
You can run Spoon as a standalone tool with your application and instrumentation APKs.
- Go to the Spoon location; D:\ROB\Spoon Runner
- Run the below command to execute the test in different devices
Example: To see the list of real devices/emulators available in the PC , use command adb devices
java -jar spoon-runner-1.1.1-jar-with-dependencies.jar –apk AndroidCalculator.apk –sdk E:\android-sdk –test-apk TestAndProj.apk
Spoon execution report will be generated as a html file under the location D:\ROB\Spoon Runner\spoon-output\index.html