./gradlew connected[Flavor]DebugAndroidTest
./gradlew connectedBuildVariantAndroidTest
Example:
./gradlew connectedDevelopmentDebugAndroidTest
As vida said you can run ./gradlew tasks to check all possibilities to run gradle commands.
./gradlew tasks
I'd like to suggest the following:./gradlew tasks | grep connected.This filter all connectedAndroidTest variants that can be runned.
./gradlew tasks | grep connected