InstalledInstrumentationsTest
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)
แทรก |
void
|
setDevice(ITestDevice device)
ใส่อุปกรณ์ทดสอบ |
void
|
setMetricCollectors(
ตั้งค่ารายการ |
boolean
|
shouldRetry(int attemptJustExecuted,
|
|
split(int shardCountHint)
|
ตัวสร้างแบบสาธารณะ
InstalledInstrumentationsTest
public InstalledInstrumentationsTest ()
เมธอดสาธารณะ
โฮมรัน
public void run (TestInformation testInfo, ITestInvocationListener listener)
เรียกใช้การทดสอบและรายงานผลลัพธ์ไปยังผู้ฟัง
พารามิเตอร์ | |
---|---|
testInfo |
TestInformation : ออบเจ็กต์ TestInformation ที่มีข้อมูลที่เป็นประโยชน์ต่อการทดสอบ |
listener |
ITestInvocationListener : ITestInvocationListener ของผลการทดสอบ |
โยน | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
แทรก IConfiguration
ที่ใช้อยู่
พารามิเตอร์ | |
---|---|
configuration |
IConfiguration |
setDevice
public void setDevice (ITestDevice device)
ใส่อุปกรณ์ทดสอบ
พารามิเตอร์ | |
---|---|
device |
ITestDevice : ITestDevice ที่จะใช้ |
setMetricCollectors
public void setMetricCollectors (collectors)
ตั้งค่ารายการ IMetricCollector
ที่กําหนดไว้สําหรับการทดสอบ
พารามิเตอร์ | |
---|---|
collectors |
|
shouldRetry
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 |
แยก
publicsplit (int shardCountHint)
split()
เวอร์ชันอื่น ซึ่งระบุ shardCount ที่พยายามเรียกใช้ด้วย ซึ่งมีประโยชน์สำหรับโปรแกรมทดสอบบางรายการที่ตัดสินใจแบบตามอำเภอใจไม่ได้ในบางครั้ง
พารามิเตอร์ | |
---|---|
shardCountHint |
int : จํานวนชาร์ดที่พยายาม |
คิกรีเทิร์น | |
---|---|
|
ชุดการทดสอบย่อยที่จะดำเนินการแยกกัน หรือ null หากปัจจุบันการทดสอบไม่สามารถแบ่งกลุ่มได้ |