设备测试套件
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 |