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