LongevityHostRunner

public class LongevityHostRunner
extends Runner implements IDeviceTest, IBuildReceiver, IAbiReceiver, IMultiDeviceTest, IInvocationContextReceiver, ISetOptionReceiver

java.lang.Object
   ↳ org.junit.runner.Runner
     ↳ com.android.tradefed.testtype.junit4.LongevityHostRunner


A JUnit4-based Runner that composes tests run with DeviceJUnit4ClassRunner into a LongevitySuite, which runs tests repeatedly to induce stress and randomness. Tests should specify this inside a @RunWith annotation with a list of Suite.SuiteClasses to include.

See also:

Summary

Constants

String ITERATIONS_OPTION

String TOTAL_TIMEOUT_OPTION

Public constructors

LongevityHostRunner(Class<?> klass)

Public methods

IAbi getAbi()
Description getDescription()
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(Map<ITestDeviceIBuildInfo> deviceInfos)
void setInvocationContext(IInvocationContext invocationContext)
int testCount()

Constants

ITERATIONS_OPTION

static final String ITERATIONS_OPTION

Constant Value: "iterations"

TOTAL_TIMEOUT_OPTION

static final String TOTAL_TIMEOUT_OPTION

Constant Value: "total-timeout"

Public constructors

LongevityHostRunner

public LongevityHostRunner (Class<?> klass)

Parameters
klass Class

Public methods

getAbi

public IAbi getAbi ()

Returns
IAbi

getDescription

public Description getDescription ()

Returns
Description

getDevice

public ITestDevice getDevice ()

Get the device under test.

Returns
ITestDevice the ITestDevice

run

public void run (RunNotifier notifier)

Parameters
notifier RunNotifier

setAbi

public void setAbi (IAbi abi)

Parameters
abi IAbi

setBuild

public void setBuild (IBuildInfo buildInfo)

Parameters
buildInfo IBuildInfo

setDevice

public void setDevice (ITestDevice device)

Inject the device under test.

Parameters
device ITestDevice: the ITestDevice to use

setDeviceInfos

public void setDeviceInfos (Map<ITestDeviceIBuildInfo> deviceInfos)

Parameters
deviceInfos Map

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Parameters
invocationContext IInvocationContext

testCount

public int testCount ()

Returns
int