设备测试套件

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