Closed AlexDeww closed 7 months ago
It is expected there will be a character length limitation here. Instrumentation arguments can provided via a 'adb shell am instrument' shell command
I don't know why there would be a difference between gradle managed device tasks vs connectedAndroidTest tasks - perhaps the former adds additional arguments to the shell . But I suggest filing this bug against Android Studio where it will reach folks more familiar with the gradle tasks https://issuetracker.google.com/issues?q=componentid:192633%2B
Description
I try launch tests via
gradle :app:pixel2api33GoogleDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.affectedModules=:module1,:module2,etc
.If the length of
affectedModules
is more than 510 chars, I get errorInstrumentation command failed with non zero exit code
andStarting 0 tests on pixel2api33
, but if the length is less than 510, all tests launch normally (Starting 53 tests on pixel2api33
).Also, if I use
connectedGoogleDebugAndroidTest
instead ofpixel2api33GoogleDebugAndroidTest
with large length ofaffectedModules
, then tests launch normally too.AndroidX Test and Android OS Versions