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 |
JUnit4 測試執行器,也支援 IDeviceTest
。應在 JUnit4 測試上方使用 RunWith 註解指定。
摘要
巢狀類別 | |
---|---|
class |
DeviceJUnit4ClassRunner.LogAnnotation
假註解,用於將記錄傳送至記錄器。 |
class |
DeviceJUnit4ClassRunner.MetricAnnotation
假註解,用於將指標傳遞至報表工具。 |
class |
DeviceJUnit4ClassRunner.TestLogData
實作 |
class |
DeviceJUnit4ClassRunner.TestMetrics
實作 |
公用建構函式 | |
---|---|
DeviceJUnit4ClassRunner(Class<?> klass)
|
公用方法 | |
---|---|
IAbi
|
getAbi()
|
TestInformation
|
getTestInformation()
|
void
|
run(RunNotifier notifier)
|
void
|
setAbi(IAbi abi)
|
void
|
setTestInformation(TestInformation testInformation)
|
受保護的方法 | |
---|---|
Object
|
createTest()
我們會覆寫 createTest,以便設定裝置。 |
void
|
runChild(FrameworkMethod method, RunNotifier notifier)
|
Statement
|
withAfterClasses(Statement statement)
|
Statement
|
withBeforeClasses(Statement statement)
|
公用建構函式
DeviceJUnit4ClassRunner
public DeviceJUnit4ClassRunner (Class<?> klass)
參數 | |
---|---|
klass |
Class |
擲回 | |
---|---|
InitializationError |
公用方法
得分
public void run (RunNotifier notifier)
參數 | |
---|---|
notifier |
RunNotifier |
setTestInformation
public void setTestInformation (TestInformation testInformation)
參數 | |
---|---|
testInformation |
TestInformation |
受保護的方法
createTest
protected Object createTest ()
我們會覆寫 createTest,以便設定裝置。
傳回 | |
---|---|
Object |
runChild
protected void runChild (FrameworkMethod method, RunNotifier notifier)
參數 | |
---|---|
method |
FrameworkMethod |
notifier |
RunNotifier |
withAfterClasses
protected Statement withAfterClasses (Statement statement)
參數 | |
---|---|
statement |
Statement |
傳回 | |
---|---|
Statement |
withBeforeClasses
protected Statement withBeforeClasses (Statement statement)
參數 | |
---|---|
statement |
Statement |
傳回 | |
---|---|
Statement |