Is there a way to run a specific Android instrumentation unit test using Gradle? I\'ve tried
gradle -Dtest.single=UnitTestName connectedInstrumentTest
The pattern is -D.single= so in your example it should be:
-D.single=
gradle -DconnectedInstrumentTest.single=UnitTestName connectedInstrumentTest
NOTE: This answer is outdated. You should use the --tests switch in the latest versions of Gradle. (see other answers for an explanation)
--tests