DeviceJUnit4ClassRunner
public class DeviceJUnit4ClassRunner
extends BlockJUnit4ClassRunner
implements IAbiReceiver , ISetOptionReceiver , ITestInformationReceiver
java.lang.Object | ||||
↳ | org.junit.runner 運行器 | |||
↳ | org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod> | |||
↳ | org.junit.runners.BlockJUnit4ClassRunner | |||
↳ | com.android.tradefed.testtype.DeviceJUnit4ClassRunner |
也適用於IDeviceTest
JUnit4 測試運行器。應該在帶有 RunWith 註釋的 JUnit4 測試之上指定。
概括
嵌套類 | |
---|---|
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 |
設置測試信息
public void setTestInformation (TestInformation testInformation)
參數 | |
---|---|
testInformation | TestInformation |
受保護的方法
創建測試
protected Object createTest ()
我們覆蓋 createTest 以設置設備。
退貨 | |
---|---|
Object |
運行子
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 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-04-28 (世界標準時間)。
[]
[]