DeviceTestSuite
public
class
DeviceTestSuite
extends TestSuite
implements
IDeviceTest,
IRemoteTest
| java.lang.Object | ||
| ↳ | junit.framework.TestSuite | |
| ↳ | com.android.tradefed.testtype.DeviceTestSuite | |
提供 IRemoteTest 和 IDeviceTest 服務的輔助 JUnit 測試套件。
摘要
公用建構函式 | |
|---|---|
DeviceTestSuite()
|
|
DeviceTestSuite(Class<?> testClass)
|
|
公用方法 | |
|---|---|
void
|
addTestSuite(Class<T> testClass)
將指定類別的測試新增至套件 |
ITestDevice
|
getDevice()
取得測試中的裝置。 |
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
執行測試,並將結果回報給監聽器。 |
void
|
runTest(Test test, TestResult result)
覆寫父項方法,將裝置傳遞至所包含的測試 |
void
|
setDevice(ITestDevice device)
插入測試中的裝置。 |
公用建構函式
DeviceTestSuite
public DeviceTestSuite ()
DeviceTestSuite
public DeviceTestSuite (Class<?> testClass)
| 參數 | |
|---|---|
testClass |
Class |
公用方法
addTestSuite
public void addTestSuite (Class<T> testClass)
將指定類別的測試新增至套件
| 參數 | |
|---|---|
testClass |
Class |
得分
public void run (TestInformation testInfo, ITestInvocationListener listener)
執行測試,並將結果回報給監聽器。
| 參數 | |
|---|---|
testInfo |
TestInformation:包含執行測試所需實用資訊的 TestInformation 物件。 |
listener |
ITestInvocationListener:測試結果的 ITestInvocationListener |
| 擲回 | |
|---|---|
DeviceNotAvailableException |
|
runTest
public void runTest (Test test,
TestResult result)覆寫父項方法,將裝置傳入所包含的測試
| 參數 | |
|---|---|
test |
Test |
result |
TestResult |
setDevice
public void setDevice (ITestDevice device)
插入測試中的裝置。
| 參數 | |
|---|---|
device |
ITestDevice:要使用的 ITestDevice |