如何在 Junit4 中同时运行 @RunWith(RobolectricTestRunner::class) 和 @RunWith(Parameterized::class)

问题描述

我必须测试用 Kotlin 编写的 android 应用程序。我试过了

@RunWith(RobolectricTestRunner::class)
    public class GeoWindowTest {
  
    @RunWith(Parameterized::class)
    class TestParameterizedGeoWindow {}

} 

但它不起作用。我正在寻找是否有其他解决方案来使用这两个跑步者。我也可以使用 junit5,但 Roboelectric 与 junit5 尚不兼容

解决方法

Robolectric 对此提供支持,如 this blog post 中所述。

ffmpeg