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)

委托自ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))

公共方法

应该重试

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