DeviceTestSuite

public class DeviceTestSuite
extends TestSuite implements IDeviceTest, IRemoteTest

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


Helper JUnit test suite that provides the IRemoteTest and IDeviceTest services.

Summary

Public constructors

DeviceTestSuite(Class<?> testClass)
DeviceTestSuite()

Public methods

void addTestSuite(Class testClass)

Adds the tests from the given class to the suite

ITestDevice getDevice()

Get the device under test.

void run(ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

void runTest(Test test, TestResult result)

Overrides parent method to pass in device to included test

void setDevice(ITestDevice device)

Inject the device under test.

Public constructors

DeviceTestSuite

DeviceTestSuite (Class<?> testClass)

Parameters
testClass Class

DeviceTestSuite

DeviceTestSuite ()

Public methods

addTestSuite

void addTestSuite (Class testClass)

Adds the tests from the given class to the suite

Parameters
testClass Class

getDevice

ITestDevice getDevice ()

Get the device under test.

Returns
ITestDevice the ITestDevice

run

void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener ITestInvocationListener: the ITestInvocationListener of test results

Throws
DeviceNotAvailableException

runTest

void runTest (Test test, 
                TestResult result)

Overrides parent method to pass in device to included test

Parameters
test Test

result TestResult

setDevice

void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device ITestDevice: the ITestDevice to use