DeviceParameterizedRunner

public class DeviceParameterizedRunner
extends JUnitParamsRunner implements IAbiReceiver, ISetOptionReceiver, ITestInformationReceiver

java.lang.Object
org.junit.runner.Runner
  org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
    org.junit.runners.BlockJUnit4ClassRunner
      junitparams.JUnitParamsRunner
        com.android.tradefed.testtype.junit4.DeviceParameterizedRunner


用于主机端驱动的参数化测试的 JUnit4 样式的参数化运行程序。

此运行程序基于 JUnitParamsRunner,而不是 JUnit4 原生 Parameterized ,但原生参数化运行程序并不好,并且不允许运行单个方法。

另见

摘要

公共构造函数

DeviceParameterizedRunner(Class<?> klass)

公共方法

IAbi getAbi()
TestInformation getTestInformation()
void setAbi(IAbi abi)
void setTestInformation(TestInformation testInformation)

受保护的方法

ITestDevice getDevice()
List<String> getKeyValueOptions()
Statement methodInvoker(FrameworkMethod method, Object testObj)
Statement withAfterClasses(Statement statement)
Statement withBeforeClasses(Statement statement)

公共构造函数

DeviceParameterizedRunner

public DeviceParameterizedRunner (Class<?> klass)

抛出
org.junit.runners.model.InitializationError
InitializationError

公共方法

getAbi

public IAbi getAbi ()

返回
IAbi

getTestInformation

public TestInformation getTestInformation ()

返回
TestInformation

setAbi

public void setAbi (IAbi abi)

参数
abi IAbi

setTestInformation

public void setTestInformation (TestInformation testInformation)

参数
testInformation TestInformation

受保护的方法

getDevice

protected ITestDevice getDevice ()

返回
ITestDevice

getKeyValueOptions

protected List<String> getKeyValueOptions ()

返回
List<String>

methodInvoker

protected Statement methodInvoker (FrameworkMethod method, 
                Object testObj)

参数
method FrameworkMethod

testObj Object

返回
Statement

withAfterClasses

protected Statement withAfterClasses (Statement statement)

参数
statement Statement

返回
Statement

withBeforeClasses

protected Statement withBeforeClasses (Statement statement)

参数
statement Statement

返回值
Statement