IAutoRetriableTest
public
interface
IAutoRetriableTest
implements
IRemoteTest
| com.android.tradefed.testtype.retry.IAutoRetriableTest |
介面適用於未實作 ITestFilterReceiver 但仍希望支援自動重試的 IRemoteTest。
建議大多數執行者實作 ITestFilterReceiver,並精細控管要執行的測試,交由架構處理。但在某些情況下,可能無法這麼做,因此需要採用某種委派形式的重試機制。
摘要
公用方法 | |
|---|---|
default
boolean
|
shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)
|
公用方法
shouldRetry
public boolean shouldRetry (int attemptJustExecuted,
List<TestRunResult> previousResults,
Set<String> skipList)委派來源:IRetryDecision.shouldRetry(IRemoteTest,int,List)。決定是否要嘗試重試。此外,請對 IRemoteTest 進行任何必要變更,以便重試 (套用篩選器、準備下次執行等)。
| 參數 | |
|---|---|
attemptJustExecuted |
int:我們剛執行的嘗試次數。 |
previousResults |
List:剛執行的測試 TestRunResult 清單。 |
skipList |
Set:不應重試的項目集。 |
| 傳回 | |
|---|---|
boolean |
如果應重試,則為 True,否則為 False。 |
| 擲回 | |
|---|---|
DeviceNotAvailableException |
裝置復原期間可能會擲回 |