在androidTest源树中添加自定义测试类会导致AssertionFailedError

时间:2018-11-19 13:56:54

标签: android android-testing

因此,我编写了扩展了我在某些测试中使用的ProviderTestCase2的类。我所有的实际测试工作都很好,但是如果我尝试使用gradlew connectedAndroidTest运行所有测试,则会得到一个AssertionFailedError

junit.framework.AssertionFailedError: Class com.test.sample.utils.MyProviderTestCase has no public constructor TestCase(String name) or TestCase()

我的课程显然不包含任何实际测试,因此我不确定为什么会引发此错误。

0 个答案:

没有答案