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 Test 上面指定一個 RunWith 註解。
概括
嵌套類 |
---|
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)
設定阿比
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 |
與課後
protected Statement withAfterClasses (Statement statement)
和BeforeClasses
protected Statement withBeforeClasses (Statement statement)
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[{
"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":"其他"
}]