設備測試套件
public class DeviceTestSuite
extends TestSuite
implements IDeviceTest , IRemoteTest
java.lang.Object | ||
↳ | junit.framework.TestSuite | |
↳ | com.android.tradefed.testtype.DeviceTestSuite |
提供IRemoteTest
和IDeviceTest
服務的 Helper JUnit 測試套件。
概括
公共構造函數 | |
---|---|
DeviceTestSuite (Class<?> testClass) | |
DeviceTestSuite () |
公共方法 | |
---|---|
void | addTestSuite (Class<T> testClass) 將給定類的測試添加到套件中 |
ITestDevice | getDevice () 獲取待測設備。 |
void | run ( TestInformation testInfo, ITestInvocationListener listener) 運行測試,並將結果報告給偵聽器。 |
void | runTest (Test test, TestResult result) 覆蓋父方法以將設備傳遞給包含的測試 |
void | setDevice ( ITestDevice device) 注入被測設備。 |
公共構造函數
設備測試套件
public DeviceTestSuite (Class<?> testClass)
參數 | |
---|---|
testClass | Class |
設備測試套件
public DeviceTestSuite ()
公共方法
添加測試套件
public void addTestSuite (Class<T> testClass)
將給定類的測試添加到套件中
參數 | |
---|---|
testClass | Class |
跑步
public void run (TestInformation testInfo, ITestInvocationListener listener)
運行測試,並將結果報告給偵聽器。
參數 | |
---|---|
testInfo | TestInformation :包含運行測試的有用信息的TestInformation 對象。 |
listener | ITestInvocationListener : 測試結果的ITestInvocationListener |
投擲 | |
---|---|
DeviceNotAvailableException |
運行測試
public void runTest (Test test, TestResult result)
覆蓋父方法以將設備傳遞給包含的測試
參數 | |
---|---|
test | Test |
result | TestResult |