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 ExternalResource 和TestRule 的實現。 |
class | DeviceJUnit4ClassRunner.TestMetrics ExternalResource 和TestRule 的實現。 |
公共構造函數
DeviceJUnit4ClassRunner
public DeviceJUnit4ClassRunner (Class<?> klass)
公共方法
得到阿比
public IAbi getAbi ()
跑步
public void run (RunNotifier notifier)
設置Abi
public void setAbi (IAbi abi)
public void setTestInformation (TestInformation testInformation)
參數 |
---|
testInformation | TestInformation |
受保護的方法
創建測試
protected Object createTest ()
我們覆蓋 createTest 以設置設備。
運行子
protected void runChild (FrameworkMethod method,
RunNotifier notifier)
參數 |
---|
method | FrameworkMethod |
notifier | RunNotifier |
withAfterClasses
protected Statement withAfterClasses (Statement statement)
withBeforeClasses
protected Statement withBeforeClasses (Statement statement)
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-04-28 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]