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(List<IMetricCollector> collectors)
ตั้งค่ารายการ |
boolean
|
shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)
รับมอบสิทธิ์จาก |
Collection<IRemoteTest>
|
split(int shardCountHint)
เวอร์ชันทางเลือกของ |
เครื่องมือสร้างสาธารณะ
InstalledInstrumentationsTest
public InstalledInstrumentationsTest ()
เมธอดสาธารณะ
getDevice
public ITestDevice getDevice ()
เตรียมอุปกรณ์ภายใต้การทดสอบ
| การคืนสินค้า | |
|---|---|
ITestDevice |
ITestDevice |
โฮมรัน
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 (List<IMetricCollector> collectors)
ตั้งค่ารายการ IMetricCollector ที่กำหนดไว้สำหรับการทดสอบ
| พารามิเตอร์ | |
|---|---|
collectors |
List |
shouldRetry
public boolean shouldRetry (int attemptJustExecuted,
List<TestRunResult> previousResults,
Set<String> skipList)รับมอบสิทธิ์จาก IRetryDecision.shouldRetry(IRemoteTest,int,List) ตัดสินใจว่าจะลองอีกครั้งหรือไม่ นอกจากนี้ ให้ทำการเปลี่ยนแปลงที่จำเป็นกับ IRemoteTest เพื่อ
ลองอีกครั้ง (ใช้ตัวกรอง เตรียมการเรียกใช้ครั้งถัดไป ฯลฯ)
| พารามิเตอร์ | |
|---|---|
attemptJustExecuted |
int: จำนวนความพยายามที่เราเพิ่งเรียกใช้ |
previousResults |
List: รายการ TestRunResult ของการทดสอบที่เพิ่งเรียกใช้ |
skipList |
Set: ชุดรายการที่ไม่ควรลองอีกครั้ง |
| การคืนสินค้า | |
|---|---|
boolean |
เป็นจริงหากควรลองอีกครั้ง ไม่เช่นนั้นจะเป็นเท็จ |
| ส่ง | |
|---|---|
DeviceNotAvailableException |
|
แยก
public Collection<IRemoteTest> split (int shardCountHint)
เวอร์ชันทางเลือกของ split() ซึ่งยังระบุ shardCount ที่พยายามเรียกใช้ด้วย
ซึ่งจะเป็นประโยชน์สำหรับโปรแกรมเรียกใช้การทดสอบบางรายการที่บางครั้งไม่สามารถตัดสินใจได้โดยพลการ
| พารามิเตอร์ | |
|---|---|
shardCountHint |
int: จำนวนชาร์ดที่พยายาม |
| การคืนสินค้า | |
|---|---|
Collection<IRemoteTest> |
ชุดการทดสอบย่อยที่จะดำเนินการแยกกันหรือ null หากการทดสอบ
ยังไม่สามารถแยกส่วนได้ในขณะนี้ |