Running android unit tests from gradle is not possible anymore using the latest android sdk (22.6.1). Using 22.3 everything was fine.
Running the same tests locally without jenkins everything is fine too.
Behavior seen is that the jenkins plugins seems to think that the emulator has crashed and hence stops the tests. Output seen from the gradle script:
Starting 115 tests on sdk - 4.3
com.example.MyTest > testAndroidTestCaseSetupProperly[sdk - 4.3] [31mFAILED [0m
Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Process crashed.''. Check device logcat for details
Tests on sdk - 4.3 failed: Instrumentation run failed due to 'Process crashed.'
Starting 115 tests on emulator-38135 - 4.3
com.example.MyTest > testAndroidTestCaseSetupProperly[emulator-38135 - 4.3] [32mSUCCESS [0m
--> then the tests stop executing. Also strange to notice is that is seems to try to restart a new emulator with the name "emulator-38135" instead of the normal name "sdk"
Logcat output is not very helpful, something seems to force-stop the tests:
03-25 04:12:16.633 I/ActivityManager( 285): Start proc com.mypackage.library.test for added application com.mypackage.library.test: pid=1622 uid=10046 gids=
03-25 04:12:17.453 I/TestRunner( 1622): started: testAndroidTestCaseSetupProperly(com.mypackage.MyFirstTest)
03-25 04:12:19.763 I/ActivityManager( 285): Force stopping package com.mypackage.library.test appid=10046 user=0
03-25 04:12:19.763 I/ActivityManager( 285): Killing proc 1622:com.mypackage.library.test/u0a10046: force stop com.mypackage.library.test
03-25 04:12:19.783 W/ActivityManager( 285): Crash of app com.mypackage.library.test running instrumentation ComponentInfo