ทดสอบเครื่องมือติดตั้งแล้ว
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
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 ( collectors) setMetricCollectors ( collectors) ตั้งค่ารายการ |
boolean | shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) |
split (int shardCountHint) เวอร์ชันทางเลือกของ |
ผู้รับเหมาก่อสร้างสาธารณะ
ทดสอบเครื่องมือติดตั้งแล้ว
public InstalledInstrumentationsTest ()
วิธีการสาธารณะ
รับอุปกรณ์
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 ที่จะใช้ |
setMetricCollectors
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 |
แยก
publicsplit (int shardCountHint)
เวอร์ชันทางเลือกของ split()
ซึ่งจัดเตรียม shardCount ที่พยายามเรียกใช้ด้วย สิ่งนี้มีประโยชน์สำหรับผู้ทดสอบบางรายที่ไม่สามารถตัดสินใจได้ตามอำเภอใจในบางครั้ง
พารามิเตอร์ | |
---|---|
shardCountHint | int : จำนวนชาร์ดที่พยายามทำ |
การส่งคืน | |
---|---|
ชุดของการทดสอบย่อยที่จะดำเนินการแยกกันหรือ null หากการทดสอบยังไม่สามารถแบ่งส่วนได้ |