IAutoRetriableTest
public interface IAutoRetriableTest
implements IRemoteTest
com.android.tradefed.testtype.retry.IAutoRetriableTest |
未實現ITestFilterReceiver
但仍希望支持自動重試的IRemoteTest
的接口。
對大多數運行者的建議是實施ITestFilterReceiver
並對正在運行的測試進行精細控制以供線束處理。但在某些情況下,這可能是不可能的,並且需要某種委託形式的重試。
概括
公共方法 | |
---|---|
default boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
公共方法
應該重試
public boolean shouldRetry (int attemptJustExecuted,previousResults)
委託自ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
。決定是否應該嘗試重試。還要對要重試的IRemoteTest
進行任何必要的更改(應用過濾器、準備下一次運行等)。
參數 | |
---|---|
attemptJustExecuted | int :我們剛剛運行的嘗試次數。 |
previousResults | TestRunResult 列表。 |
退貨 | |
---|---|
boolean | 如果我們應該重試,則為 True,否則為 False。 |
投擲 | |
---|---|
DeviceNotAvailableException | 可以在設備恢復期間拋出 |