Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Android test does not support filter (--tests)

Gradle Android test does not support filter (--tests).

 gradlew test --tests com.example.test.*

works.

 gradlew connectedAndroidTest --tests com.example.test.*

Error: Unknown command-line option '--tests'.

like image 293
eastwater Avatar asked Feb 24 '18 22:02

eastwater


1 Answers

To run specific AndroidJUnit4 tests providing instrumentation runner is necessary to gradle.

try this format:

./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.testing.blueprint.ui.espresso.EspressoTest

Here is the list of all useful gradle commands {LINK}

like image 168
vk.4884 Avatar answered Oct 18 '22 01:10

vk.4884