การทดสอบเครื่องมือที่ติดตั้งไว้

public class InstalledInstrumentationsTest
extends Object implements IAutoRetriableTest, IConfigurationReceiver, IDeviceTest, IMetricCollectorReceiver, IShardableTest

java.lang.Object
com.android.tradefed.testtype.InstalledInstrumentationsTest


เรียกใช้เครื่องมือทั้งหมดที่พบในอุปกรณ์ปัจจุบัน

สรุป

ช่างก่อสร้างสาธารณะ

InstalledInstrumentationsTest()

วิธีการสาธารณะ

ITestDevice getDevice()

นำอุปกรณ์มาทดสอบ

void run(TestInformation testInfo, ITestInvocationListener listener)

เรียกใช้การทดสอบ และรายงานผลไปยังผู้ฟัง

void setConfiguration(IConfiguration configuration)

แทรก IConfiguration ที่ใช้งานอยู่

void setDevice(ITestDevice device)

ใส่อุปกรณ์ที่อยู่ระหว่างการทดสอบ

void setMetricCollectors( collectors)

ตั้งค่ารายการ IMetricCollector ที่กำหนดไว้สำหรับการดำเนินการทดสอบ

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))

split(int shardCountHint)

เวอร์ชันทางเลือกของ split() ที่มี ShardCount ที่มีความพยายามด้วยเช่นกัน ที่จะเรียกใช้

ช่างก่อสร้างสาธารณะ

การทดสอบเครื่องมือที่ติดตั้งไว้

public InstalledInstrumentationsTest ()

วิธีการสาธารณะ

GetDevice

public ITestDevice getDevice ()

นำอุปกรณ์มาทดสอบ

คิกรีเทิร์น
ITestDevice ITestDevice

โฮมรัน

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

เรียกใช้การทดสอบ และรายงานผลไปยังผู้ฟัง

พารามิเตอร์
testInfo TestInformation: ออบเจ็กต์ TestInformation ซึ่งมีข้อมูลที่เป็นประโยชน์ที่จะเรียกใช้ การทดสอบ

listener ITestInvocationListener: ITestInvocationListener ของผลการทดสอบ

การขว้าง
DeviceNotAvailableException

ตั้งค่าการกำหนดค่า

public void setConfiguration (IConfiguration configuration)

แทรก IConfiguration ที่ใช้งานอยู่

พารามิเตอร์
configuration IConfiguration

ตั้งค่าอุปกรณ์

public void setDevice (ITestDevice device)

ใส่อุปกรณ์ที่อยู่ระหว่างการทดสอบ

พารามิเตอร์
device ITestDevice: ITestDevice ที่จะใช้

setMetricCollector"

public void setMetricCollectors ( collectors)

ตั้งค่ารายการ IMetricCollector ที่กำหนดไว้สำหรับการดำเนินการทดสอบ

พารามิเตอร์
collectors

ควรลองอีกครั้ง

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

แยก

public  split (int shardCountHint)

เวอร์ชันทางเลือกของ split() ที่มี ShardCount ที่มีความพยายามด้วยเช่นกัน ที่จะเรียกใช้ ซึ่งมีประโยชน์สำหรับผู้ทำการทดสอบบางรายที่ไม่สามารถตัดสินใจด้วยตนเองได้ในบางครั้ง

พารามิเตอร์
shardCountHint int: จำนวนชาร์ดที่พยายาม

คิกรีเทิร์น
คอลเล็กชันของการทดสอบย่อยที่จะดำเนินการแยกต่างหากหรือ null หากการทดสอบคือ ไม่สามารถชาร์ดได้ในขณะนี้