จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ

ติดตั้งInstrumentationsTest

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)

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

void setDevice ( ITestDevice device)

ฉีดอุปกรณ์ภายใต้การทดสอบ

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

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

boolean shouldRetry (int attemptJustExecuted, previousResults) 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)) .

split (int shardCountHint)

เวอร์ชันทางเลือกของ split() ซึ่งมี shardCount ที่พยายามเรียกใช้ด้วย

ผู้สร้างสาธารณะ

ติดตั้งInstrumentationsTest

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

แยก

public  split (int shardCountHint)

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

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

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