IAutoRetriableTest

public interface IAutoRetriableTest
implements IRemoteTest

com.android.tradefed.testtype.retry.IAutoRetriableTest


适用于不实现 ITestFilterReceiver 但仍 希望支持自动重试的 IRemoteTest 的接口。

对于大多数运行程序,建议实现 ITestFilterReceiver 并对 要运行哪些测试进行精细控制,以便由 harness 处理。但在某些情况下,这 可能无法实现,并且需要某种委托形式的重试。

摘要

公共方法

default boolean shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)

委托方:IRetryDecision.shouldRetry(IRemoteTest,int,List)

公共方法

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 可能会在设备恢复期间抛出