Gradle Android test does not support filter (--tes

2019-05-14 20:21发布

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'.

1条回答
女痞
2楼-- · 2019-05-14 21:09

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}

查看更多
登录 后发表回答