因此,我编写了扩展了我在某些测试中使用的ProviderTestCase2
的类。我所有的实际测试工作都很好,但是如果我尝试使用gradlew connectedAndroidTest
运行所有测试,则会得到一个AssertionFailedError
。
junit.framework.AssertionFailedError: Class com.test.sample.utils.MyProviderTestCase has no public constructor TestCase(String name) or TestCase()
我的课程显然不包含任何实际测试,因此我不确定为什么会引发此错误。