【发布时间】:2017-05-04 09:56:09
【问题描述】:
假设我想将 Robolectric 测试与普通单元测试分开,并将它们作为单独的 gradle 任务运行。可能吗?
我已经设法从单元测试中排除不需要的测试:
android {
...
testOptions {
unitTests.all {
exclude 'package/with/robolectric/tests/**'
}
}
}
但现在我不确定如何配置单独的测试任务,该任务将仅包含来自 package/with/robolectric/tests/ 包的测试。
我发现了类似的问题,但答案不起作用: Separate integration test task on gradle with android
【问题讨论】:
标签: android unit-testing android-studio gradle