Android.Test 命名空間

一個用於撰寫 Android 測試案例與套件的框架。

類別

名稱 Description
AssertionFailedError

當主張失敗時,他會被拋棄。

ComparisonFailure

當 Strings 的斷言等於失敗時會被丟棄。

FlakyTest

此註解可用於 android.test.InstrumentationTestCase的測試方法。

FlakyTestAttribute

當測試方法失敗時,標記 android.test.InstrumentationTestCase 為重新執行的標記。

InstrumentationTestRunner

Instrumentation,針對 Android 套件 (應用程式) 執行各種類型的 junit.framework.TestCase

IsolatedContext

一個模擬上下文,阻止使用者與裝置其他部分通訊,同時插入足夠方法來滿足嘗試與其他套件溝通的程式碼。

MoreAsserts

包含 JUnit 中找不到的其他判斷提示方法。

RenamingDelegatingContext

這是一個會委派給特定上下文的類別,但執行資料庫和檔案操作時會用重新命名的資料庫/檔案名稱(預設名稱前綴會加上特定的前綴)。

TouchUtils

產生觸控事件的可重複使用方法。

UiThreadTest

此註解可用於 InstrumentationTestCase的測試方法。

UiThreadTestAttribute

標記 android.test.InstrumentationTestCase 一個測試方法,要在應用程式的主執行緒上執行。

ViewAsserts

關於觀點的一些有用斷言。

介面

名稱 Description
IFlakyTest

此註解可用於 android.test.InstrumentationTestCase的測試方法。

IPerformanceTestCase

測試案例的介面效能更複雜。

IPerformanceTestCaseIntermediates

回調。PerformanceTestCase

IUiThreadTest

此註解可用於 InstrumentationTestCase的測試方法。

列舉

名稱 Description
TestResult

透過 的 TestResult多種方法列舉 。