設備測試套件

public class DeviceTestSuite
extends TestSuite implements IDeviceTest , IRemoteTest

java.lang.Object
junit.framework.TestSuite
com.android.tradefed.testtype.DeviceTestSuite


Helper JUnit 測試套件提供IRemoteTestIDeviceTest服務。

概括

公共構造函數

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 ITestDevice getDevice ()

獲取被測設備。

退貨
ITestDevice ITestDevice

跑步

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

運行測試,並將結果報告給偵聽器。

參數
testInfo TestInformationTestInformation物件包含執行測試的有用資訊。

listener ITestInvocationListener :測試結果的ITestInvocationListener

投擲
DeviceNotAvailableException

運行測試

public void runTest (Test test, 
                TestResult result)

重寫父方法以將設備傳遞給包含的測試

參數
test Test

result TestResult

設定設備

public void setDevice (ITestDevice device)

注入被測設備。

參數
device ITestDevice :要使用的ITestDevice