自动重试测试

public interface IAutoRetriableTest
implements IRemoteTest

com.android.tradefed.testtype.retry.IAutoRetriableTest


未实现ITestFilterReceiver但仍希望支持自动重试的IRemoteTest接口。

对于大多数运行者的建议是实现ITestFilterReceiver并对正在运行的测试进行精细控制以供线束处理。但在某些情况下,这可能是不可能的,并且需要某种委托形式的重试。

概括

公共方法

default boolean shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList)

委托自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, 
                 skipList)

委托自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列表。

skipList :不应重试的一组项目。

退货
boolean如果我们应该重试,则为 True,否则为 False。

投掷
DeviceNotAvailableException设备恢复期间可能会抛出