IAutoRetriableTest

public interface IAutoRetriableTest
implements IRemoteTest

com.android.tradefed.testtype.retry.IAutoRetriableTest


อินเทอร์เฟซสำหรับ IRemoteTest ที่ไม่ได้ใช้ ITestFilterReceiver แต่ยังคงต้องการรองรับการลองใหม่อัตโนมัติ

คำแนะนำสำหรับนักวิ่งส่วนใหญ่คือการใช้ 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 จริงหากเราควรลองอีกครั้ง มิฉะนั้นเป็นเท็จ

ขว้าง
DeviceNotAvailableException สามารถโยนทิ้งได้ระหว่างการกู้คืนอุปกรณ์