Most visited

Recently visited

Added in API level 1

android.test

一个编写Android测试用例和套件的框架。

有关更多信息,请参阅 Testing开发人员指南。

Annotations

FlakyTest 此@interface在API级别24中已弃用。请改为使用FlakyTest 。 新的测试应该使用Android Testing Support Library编写 。
UiThreadTest 此@interface已在API级别24中弃用。请改为使用UiThreadTest 。 新的测试应该使用Android Testing Support Library编写 。

Interfaces

PerformanceTestCase 测试用例更复杂的接口性能。
PerformanceTestCase.Intermediates 回调 PerformanceTestCase 。
TestSuiteProvider 实现者将知道如何获得测试套件。

Classes

ActivityInstrumentationTestCase<T extends Activity> 此类在API级别3中已被弃用。应使用ActivityInstrumentationTestCase2编写新测试,它提供了更多选项来配置测试活动
ActivityInstrumentationTestCase2<T extends Activity> 此类已在API级别24中弃用。请改为使用ActivityTestRule 。 新的测试应该使用Android Testing Support Library编写 。
ActivityTestCase 该级别在API级别24中已弃用。应使用Android Testing Support Library编写新测试。
ActivityUnitTestCase<T extends Activity> 此类已在API级别24中弃用。 请改为写入Local Unit Tests 。
AndroidTestCase 此类已在API级别24中弃用。请改用InstrumentationRegistry 。 新的测试应该使用Android Testing Support Library编写 。
AndroidTestRunner 此类已在API级别24中弃用。请改为使用AndroidJUnitRunner 。 新的测试应该使用Android Testing Support Library编写 。
ApplicationTestCase<T extends Application> 此类已在API级别24中弃用。请改为使用InstrumentationRegistry 。 新的测试应该使用Android Testing Support Library编写 。
InstrumentationTestCase 此类已在API级别24中弃用。请改为使用InstrumentationRegistry 。 新的测试应使用Android Testing Support Library编写 。
InstrumentationTestRunner 此类已在API级别24中弃用。请改为使用AndroidJUnitRunner 。 新的测试应该使用Android Testing Support Library编写 。
InstrumentationTestSuite 此类已在API级别24中弃用。请改为使用InstrumentationRegistry 。 新的测试应该使用Android Testing Support Library编写 。
IsolatedContext 该级别在API级别24中已弃用。应使用Android Testing Support Library编写新测试。
LoaderTestCase 用于测试 Loader的便利课程。
MoreAsserts 此类已在API级别24中弃用。请改为使用Hamcrest matchers 。
ProviderTestCase<T extends ContentProvider> 此类在API级别3中已弃用。此类扩展了InstrumentationTestCase,但应扩展AndroidTestCase。 改为使用ProviderTestCase2来解决这个问题。
ProviderTestCase2<T extends ContentProvider> 此测试用例类提供了一个框架,用于测试单个 ContentProvider并使用独立内容提供程序测试您的应用程序代码。
RenamingDelegatingContext 该级别在API级别24中已弃用。应使用Android Testing Support Library编写新测试。
ServiceTestCase<T extends Service> 此类已在API级别24中弃用。请改为使用ServiceTestRule 。 新的测试应该使用Android Testing Support Library编写 。
SingleLaunchActivityTestCase<T extends Activity> 此类已在API级别24中弃用。请改为使用ActivityTestRule 。 新的测试应该使用Android Testing Support Library编写 。
SyncBaseInstrumentation 此类已在API级别24中弃用。请改为使用InstrumentationRegistry 。 新的测试应该使用Android Testing Support Library编写 。
TouchUtils 此类已在API级别24中弃用。请改为使用Espresso UI testing framework 。 新的测试应该使用Android Testing Support Library编写 。
ViewAsserts 此类已在API级别24中弃用。请改为使用Espresso View Matchers 。 新的测试应该使用Android Testing Support Library编写 。 有关UI测试的更多信息,请参加Espresso UI testing培训。

Errors

AssertionFailedError 此类已在API级别16中弃用。请使用junit.framework.AssertionFailedError
ComparisonFailure 此类已在API级别16中弃用。请使用junit.framework.ComparisonFailure

Hooray!