从 Android Studio 中排除 Robolectric 测试

时间:2021-02-23 22:18:36

标签: android android-studio gradle

我目前在我的应用程序中使用 Hilt。 It's currently not possible to run Hilt/Robolectric tests using the default Android Studio "run tests" function。但是,能够使用它来运行我套件的其余部分非常方便。

如何排除在 Android Studio 中运行的某些测试,但仍然从 Gradle 命令行运行我的 Robolectric 测试?

我感兴趣的示例解决方案:

  • 用于 Robolectric 测试的单独测试文件夹,但是我找不到解决 this similar problem 的好方法
  • Robolectric 测试的注释。 Gradle 中有没有办法忽略 @Ignore

0 个答案:

没有答案