DeviceJUnit4ClassRunner

public class DeviceJUnit4ClassRunner
extends BlockJUnit4ClassRunner implements IAbiReceiver, ISetOptionReceiver, ITestInformationReceiver

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


Test runner JUnit4, który obsługuje też IDeviceTest. Należy go określić powyżej testu JUnit4 za pomocą adnotacji RunWith.

Podsumowanie

Zagnieżdżone klasy

class DeviceJUnit4ClassRunner.LogAnnotation

Fałszywa adnotacja, która ma przekazywać logi do reporterów. 

class DeviceJUnit4ClassRunner.MetricAnnotation

Fałszywa adnotacja, która ma przekazywać dane do reporterów. 

class DeviceJUnit4ClassRunner.TestLogData

Implementacja ExternalResource i TestRule

class DeviceJUnit4ClassRunner.TestMetrics

Implementacja ExternalResource i TestRule

Konstruktory publiczne

DeviceJUnit4ClassRunner(Class<?> klass)

Metody publiczne

IAbi getAbi()
TestInformation getTestInformation()
void run(RunNotifier notifier)
void setAbi(IAbi abi)
void setTestInformation(TestInformation testInformation)

Metody chronione

Object createTest()

Zastępujemy createTest, aby ustawić urządzenie.

void runChild(FrameworkMethod method, RunNotifier notifier)
Statement withAfterClasses(Statement statement)
Statement withBeforeClasses(Statement statement)

Konstruktory publiczne

DeviceJUnit4ClassRunner

public DeviceJUnit4ClassRunner (Class<?> klass)

Parametry
klass Class

Zgłasza
InitializationError

Metody publiczne

getAbi

public IAbi getAbi ()

Zwraca
IAbi

getTestInformation

public TestInformation getTestInformation ()

Zwraca
TestInformation

run

public void run (RunNotifier notifier)

Parametry
notifier RunNotifier

setAbi

public void setAbi (IAbi abi)

Parametry
abi IAbi

setTestInformation

public void setTestInformation (TestInformation testInformation)

Parametry
testInformation TestInformation

Metody chronione

createTest

protected Object createTest ()

Zastępujemy createTest, aby ustawić urządzenie.

Zwraca
Object

Zgłasza
Exception

runChild

protected void runChild (FrameworkMethod method, 
                RunNotifier notifier)

Parametry
method FrameworkMethod

notifier RunNotifier

withAfterClasses

protected Statement withAfterClasses (Statement statement)

Parametry
statement Statement

Zwraca
Statement

withBeforeClasses

protected Statement withBeforeClasses (Statement statement)

Parametry
statement Statement

Zwraca
Statement