DeviceJUnit4ClassRunner
public
class
DeviceJUnit4ClassRunner
extends BlockJUnit4ClassRunner
implements
IDeviceTest,
IBuildReceiver,
IAbiReceiver,
ISetOptionReceiver,
IMultiDeviceTest,
IInvocationContextReceiver
java.lang.Object | ||||
↳ | org.junit.runner.Runner | |||
↳ | org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod> | |||
↳ | org.junit.runners.BlockJUnit4ClassRunner | |||
↳ | com.android.tradefed.testtype.DeviceJUnit4ClassRunner |
JUnit4 test runner that also accommodate IDeviceTest
. Should be specify above JUnit4 Test
with the RunWith annotation.
Summary
Nested classes | |
---|---|
class |
DeviceJUnit4ClassRunner.LogAnnotation
Fake annotation meant to carry logs to the reporters. |
class |
DeviceJUnit4ClassRunner.MetricAnnotation
Fake annotation meant to carry metrics to the reporters. |
class |
DeviceJUnit4ClassRunner.TestLogData
Implementation of |
class |
DeviceJUnit4ClassRunner.TestMetrics
Implementation of |
Public constructors | |
---|---|
DeviceJUnit4ClassRunner(Class<?> klass)
|
Public methods | |
---|---|
IAbi
|
getAbi()
|
ITestDevice
|
getDevice()
Get the device under test. |
void
|
run(RunNotifier notifier)
|
void
|
setAbi(IAbi abi)
|
void
|
setBuild(IBuildInfo buildInfo)
|
void
|
setDevice(ITestDevice device)
Inject the device under test. |
void
|
setDeviceInfos(
|
void
|
setInvocationContext(IInvocationContext invocationContext)
|
Protected methods | |
---|---|
Object
|
createTest()
We override createTest in order to set the device. |
void
|
runChild(FrameworkMethod method, RunNotifier notifier)
|
Public constructors
DeviceJUnit4ClassRunner
public DeviceJUnit4ClassRunner (Class<?> klass)
Parameters | |
---|---|
klass |
Class |
Throws | |
---|---|
InitializationError |
Public methods
getDevice
public ITestDevice getDevice ()
Get the device under test.
Returns | |
---|---|
ITestDevice |
the ITestDevice
|
run
public void run (RunNotifier notifier)
Parameters | |
---|---|
notifier |
RunNotifier |
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to use
|
setDeviceInfos
public void setDeviceInfos (deviceInfos)
Parameters | |
---|---|
deviceInfos |
|
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
Parameters | |
---|---|
invocationContext |
IInvocationContext |
Protected methods
createTest
protected Object createTest ()
We override createTest in order to set the device.
Returns | |
---|---|
Object |
runChild
protected void runChild (FrameworkMethod method, RunNotifier notifier)
Parameters | |
---|---|
method |
FrameworkMethod |
notifier |
RunNotifier |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.