How not to run a particular test when executing connectedAndroidTest?

风流意气都作罢 提交于 2020-01-03 15:34:30

问题


It takes long to execute some of our instrumented tests. So I'd like not to run them when I run all the other instrumented tests with gradle connectedAndroidTest.

Why don't I annotate those tests with @Ignore? Because I'd like to run them later using adb shell as described here. Like this:

Running all tests except those in a particular class: adb shell am instrument -w -e notClass com.android.foo.FooTest com.android.foo/android.support.test.runner.AndroidJUnitRunner

If I marked those tests ignored and compiled them, it wouldn't be possible to execute them at all.

Is it possible to modify connectedAndroidTest or some other task to reach what I need?

来源:https://stackoverflow.com/questions/37284978/how-not-to-run-a-particular-test-when-executing-connectedandroidtest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!